cgroups: Fix a lockdep warning at cgroup removal
authorLi Zefan <lizf@cn.fujitsu.com>
Fri, 14 Jan 2011 03:34:34 +0000 (11:34 +0800)
committerNick Piggin <npiggin@kernel.dk>
Fri, 14 Jan 2011 08:46:29 +0000 (08:46 +0000)
Commit 2fd6b7f5 ("fs: dcache scale subdirs") forgot to annotate a dentry
lock, which caused a lockdep warning.

Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
kernel/cgroup.c

index 51cddc11cd85c847ec0fee3cd9a00fae3b66b4b0..a7837e2d9d6b27500f7431c61517b7d9ddc738d4 100644 (file)
@@ -912,7 +912,7 @@ static void cgroup_d_remove_dir(struct dentry *dentry)
 
        parent = dentry->d_parent;
        spin_lock(&parent->d_lock);
-       spin_lock(&dentry->d_lock);
+       spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
        list_del_init(&dentry->d_u.d_child);
        spin_unlock(&dentry->d_lock);
        spin_unlock(&parent->d_lock);