From b9ab2f38fdee96ff49b8a7bbb65cbfc60921e40c Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Fri, 29 Jan 2010 15:38:22 -0800 Subject: 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 Signed-off-by: John Stultz Signed-off-by: Thomas Gleixner --- include/linux/dcache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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) { -- cgit v1.2.3