diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-07-29 13:05:23 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-07-29 13:05:23 +0300 |
commit | d719e8f268fa4f9944b24b60814da9017dfb7787 (patch) | |
tree | 0840f4bffc0abe65fb60286732bdc2ac1846dc7b /fs/overlayfs/overlayfs.h | |
parent | bb0d2b8ad29630b580ac903f989e704e23462357 (diff) | |
download | linux-d719e8f268fa4f9944b24b60814da9017dfb7787.tar.xz |
ovl: update atime on upper
Fix atime update logic in overlayfs.
This patch adds an i_op->update_time() handler to overlayfs inodes. This
forwards atime updates to the upper layer only. No atime updates are done
on lower layers.
Remove implicit atime updates to underlying files and directories with
O_NOATIME. Remove explicit atime update in ovl_readlink().
Clear atime related mnt flags from cloned upper mount. This means atime
updates are controlled purely by overlayfs mount options.
Reported-by: Konstantin Khlebnikov <koct9i@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/overlayfs.h')
-rw-r--r-- | fs/overlayfs/overlayfs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index e8d50da384d5..fb73c09a84e7 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -181,6 +181,7 @@ ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size); int ovl_removexattr(struct dentry *dentry, const char *name); struct posix_acl *ovl_get_acl(struct inode *inode, int type); int ovl_open_maybe_copy_up(struct dentry *dentry, unsigned int file_flags); +int ovl_update_time(struct inode *inode, struct timespec *ts, int flags); struct inode *ovl_new_inode(struct super_block *sb, umode_t mode, struct ovl_entry *oe); @@ -189,6 +190,9 @@ static inline void ovl_copyattr(struct inode *from, struct inode *to) to->i_uid = from->i_uid; to->i_gid = from->i_gid; to->i_mode = from->i_mode; + to->i_atime = from->i_atime; + to->i_mtime = from->i_mtime; + to->i_ctime = from->i_ctime; } /* dir.c */ |