OpenVZ Forum


Home » Mailing lists » Devel » Re: linux-next: lockdep whinge in cgroup_rmdir
Re: linux-next: lockdep whinge in cgroup_rmdir [message #41999] Fri, 14 January 2011 04:10
Nick Piggin is currently offline  Nick Piggin
Messages: 35
Registered: March 2006
Member
On Fri, Jan 14, 2011 at 3:06 PM, Li Zefan <lizf@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@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@vt.edu>
> Signed-off-by: Li Zefan <lizf@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@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containe rs
Previous Topic: Re: linux-next: lockdep whinge in cgroup_rmdir
Next Topic: [PATCH v3 11/16] Export iterate_mounts symbol to be able to use from sunrpc module.
Goto Forum:
  


Current Time: Mon Nov 18 18:31:24 GMT 2024

Total time taken to generate the page: 0.02778 seconds