Skip to content
Commit 8b19e341 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

vfs: make getcwd() get the root and pwd path under rcu



This allows us to skip all the crazy spinlocks and reference count
updates, and instead use the fs sequence read-lock to get an atomic
snapshot of the root and cwd information.

We might want to make the rule that "prepend_path()" is always called
with the RCU lock held, but the RCU lock nests fine and this is the
minimal fix.

Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5762482f
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