summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2010-01-29 15:38:22 -0800
committerThomas Gleixner <tglx@linutronix.de>2010-04-27 17:32:33 +0200
commitb9ab2f38fdee96ff49b8a7bbb65cbfc60921e40c (patch)
treee5e785ba4ae7ec89564914c50638a22d756b6d19 /include
parentd4fe09131b66c5a7176a5dbfc9bd1ef6939643e8 (diff)
downloadlwn-b9ab2f38fdee96ff49b8a7bbb65cbfc60921e40c.tar.gz
lwn-b9ab2f38fdee96ff49b8a7bbb65cbfc60921e40c.zip
fs-dcache-scale-d_subdirs
Protect d_subdirs and d_child with d_lock, except in filesystems that aren't using dcache_lock for these anyway (eg. using i_mutex). XXX: probably don't need parent lock in inotify (because child lock should stabilize parent). Also, possibly some filesystems don't need so much locking (eg. of child dentry when modifying d_child, so long as parent is locked)... but be on the safe side. Hmm, maybe we should just say d_child list is protected by d_parent->d_lock. d_parent could remain protected with d_lock. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dcache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index fbbaee8f7829..8a6bb7157ff5 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -340,6 +340,7 @@ static inline struct dentry *dget_dlock(struct dentry *dentry)
}
return dentry;
}
+
static inline struct dentry *dget(struct dentry *dentry)
{
if (dentry) {