aboutsummaryrefslogtreecommitdiffstats
path: root/fs/internal.h
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-09-16 06:44:20 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2016-09-16 06:44:20 -0400
commit598e3c8f72f5b77c84d2cb26cfd936ffb3cfdbaa (patch)
tree485f1dd152279acde134219e011f3f1dadbe5495 /fs/internal.h
parentf2b20f6ee842313a0d681dbbf7f87b70291a6a3b (diff)
vfs: update ovl inode before relatime check
On overlayfs relatime_need_update() needs inode times to be correct on overlay inode. But i_mtime and i_ctime are updated by filesystem code on underlying inode only, so they will be out-of-date on the overlay inode. This patch copies the times from the underlying inode if needed. This can't be done if called from RCU lookup (link following) but link m/ctime are not updated by fs, so this is all right. This patch doesn't change functionality for anything but overlayfs. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/internal.h')
-rw-r--r--fs/internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/internal.h b/fs/internal.h
index ba0737649d4a..a63da5e96148 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -120,6 +120,15 @@ extern long prune_icache_sb(struct super_block *sb, struct shrink_control *sc);
120extern void inode_add_lru(struct inode *inode); 120extern void inode_add_lru(struct inode *inode);
121extern int dentry_needs_remove_privs(struct dentry *dentry); 121extern int dentry_needs_remove_privs(struct dentry *dentry);
122 122
123extern bool __atime_needs_update(const struct path *, struct inode *, bool);
124static inline bool atime_needs_update_rcu(const struct path *path,
125 struct inode *inode)
126{
127 return __atime_needs_update(path, inode, true);
128}
129
130extern bool atime_needs_update_rcu(const struct path *, struct inode *);
131
123/* 132/*
124 * fs-writeback.c 133 * fs-writeback.c
125 */ 134 */