]> git.baikalelectronics.ru Git - kernel.git/commit
VFS/namei: make the use of touch_atime() in get_link() RCU-safe.
authorNeilBrown <neilb@suse.de>
Mon, 23 Mar 2015 02:37:40 +0000 (13:37 +1100)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 15 May 2015 05:06:27 +0000 (01:06 -0400)
commit5394c30250ddaa1351f23ff995aab9363f2952ce
treecb7dcfaa0346a06e527cd4d095d7305eda6686ad
parentc90091f1b1a66ab2a686d04a3d0a1d7df24b87a8
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>
fs/inode.c
fs/namei.c
include/linux/fs.h