aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Makefile
diff options
context:
space:
mode:
authorWaiman Long <Waiman.Long@hp.com>2013-09-02 11:29:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-02 11:29:22 -0700
commitdf3d0bbcdb2cafa23a70223d806655bd37e64a9b (patch)
treee25e1f06ad304ab4c87293f37961b8e97d7fd242 /lib/Makefile
parentlockref: add 'lockref_get_or_lock() helper (diff)
downloadlinux-dev-df3d0bbcdb2cafa23a70223d806655bd37e64a9b.tar.xz
linux-dev-df3d0bbcdb2cafa23a70223d806655bd37e64a9b.zip
vfs: use lockref_get_not_zero() for optimistic lockless dget_parent()
A valid parent pointer is always going to have a non-zero reference count, but if we look up the parent optimistically without locking, we have to protect against the (very unlikely) race against renaming changing the parent from under us. We do that by using lockref_get_not_zero(), and then re-checking the parent pointer after getting a valid reference. [ This is a re-implementation of a chunk from the original patch by Waiman Long: "dcache: Enable lockless update of dentry's refcount". I've completely rewritten the patch-series and split it up, but I'm attributing this part to Waiman as it's close enough to his earlier patch - Linus ] Signed-off-by: Waiman Long <Waiman.Long@hp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/Makefile')
0 files changed, 0 insertions, 0 deletions