[Devel] Re: linux-next: lockdep whinge in cgroup_rmdir

Nick Piggin npiggin at gmail.com
Thu Jan 13 20:12:46 PST 2011


On Fri, Jan 14, 2011 at 3:06 PM, Li Zefan <lizf at cn.fujitsu.com> wrote:
> Nick Piggin wrote:
>> It looks like it is just a missing parent->child lock order annotation, but
>> mainline cgroupfs code looks to be OK there. What does
>> cgroup_clear_directory() look like in mmotm?
>
> It's not from cgroup_clear_directory()..
>
> This should fix it:

Yep, thanks!

> =========================
>
> From: Li Zefan <lizf at cn.fujitsu.com>
> Date: Fri, 14 Jan 2011 11:34:34 +0800
> Subject: [PATCH] cgroups: Fix a lockdep warning at cgroup removal
>
> Commit 2fd6b7f5 ("fs: dcache scale subdirs") forgot to annotate a dentry
> lock, which caused a lockdep warning.
>
> Reported-by: Valdis Kletnieks <Valdis.Kletnieks at vt.edu>
> Signed-off-by: Li Zefan <lizf at cn.fujitsu.com>
> ---
>  kernel/cgroup.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index 5c5f4cc..db983e2 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -910,7 +910,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);
> --
> 1.7.3.1
>
>
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list