diff options
author | NeilBrown <neilb@suse.de> | 2015-03-23 13:37:40 +1100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-05-15 01:06:27 -0400 |
commit | 8fa9dd24667f2d6997ec21341019657342859d31 (patch) | |
tree | cb7dcfaa0346a06e527cd4d095d7305eda6686ad /include/linux/fs.h | |
parent | bc40aee053be1c2c443e812034f41e1a3cf34752 (diff) | |
download | lwn-8fa9dd24667f2d6997ec21341019657342859d31.tar.gz lwn-8fa9dd24667f2d6997ec21341019657342859d31.zip |
VFS/namei: make the use of touch_atime() in get_link() RCU-safe.
touch_atime is not RCU-safe, and so cannot be called on an RCU walk.
However, in situations where RCU-walk makes a difference, the symlink
will likely to accessed much more often than it is useful to update
the atime.
So split out the test of "Does the atime actually need to be updated"
into atime_needs_update(), and have get_link() unlazy if it finds that
it will need to do that update.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 8f738512c874..1426c435d455 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1880,6 +1880,7 @@ enum file_time_flags { S_VERSION = 8, }; +extern bool atime_needs_update(const struct path *, struct inode *); extern void touch_atime(const struct path *); static inline void file_accessed(struct file *file) { |