From: Nick Piggin Date: Fri, 7 Jan 2011 06:49:41 +0000 (+1100) Subject: fs: dcache reduce locking in d_alloc X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=89ad485f01fd83c47f17a128db3bd7b89c0f244f;p=linux-beck.git fs: dcache reduce locking in d_alloc Signed-off-by: Nick Piggin --- diff --git a/fs/dcache.c b/fs/dcache.c index 98a05696593e..ccdc5c2512df 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1253,11 +1253,13 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name) if (parent) { spin_lock(&parent->d_lock); - spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); + /* + * don't need child lock because it is not subject + * to concurrency here + */ dentry->d_parent = dget_dlock(parent); dentry->d_sb = parent->d_sb; list_add(&dentry->d_u.d_child, &parent->d_subdirs); - spin_unlock(&dentry->d_lock); spin_unlock(&parent->d_lock); }