[Devel] Re: [PATCH] Containers: Avoid lockdep warning
Dhaval Giani
dhaval at linux.vnet.ibm.com
Wed Aug 22 23:30:03 PDT 2007
On Wed, Aug 22, 2007 at 04:17:10PM -0700, Paul Menage wrote:
>
> I think this is the right way to handle the lockdep false-positive in
> the current containers patches, but I'm not that familiar with lockdep
> so any suggestions for a better approach are welcomed.
>
>
> In order to avoid a false-positive lockdep warning, we lock the root
> inode of a new filesystem mount prior to taking container_mutex, to
> preserve the invariant that container_mutex nests inside
> inode->i_mutex. In order to prevent a lockdep false positive when
> locking i_mutex on a newly-created container directory inode we use
> mutex_lock_nested(), with a nesting level of I_MUTEX_CHILD since the
> new inode will ultimately be a child directory of the parent whose
> i_mutex is nested outside of container_mutex.
Hi Paul,
Just tried it out, and it works for me.
--
regards,
Dhaval
I would like to change the world but they don't give me the source code!
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list