Skip to content
Commit 8fa9dd24 authored by NeilBrown's avatar NeilBrown Committed by Al Viro
Browse files

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: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent bc40aee0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment