]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: make getcwd() get the root and pwd path under rcu
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Sep 2013 17:35:47 +0000 (10:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Sep 2013 17:35:47 +0000 (10:35 -0700)
commit7725926401c9f16f2901a2a24d72146a739d82a9
treeb6affbe820569551bebfd39cc07965855080d2c1
parent654cc81967a4fdfb85e435c55df920d154b39673
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: Linus Torvalds <torvalds@linux-foundation.org>
fs/dcache.c