OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] Containers: Avoid lockdep warning
Re: [PATCH] Containers: Avoid lockdep warning [message #19753 is a reply to message #19746] Thu, 23 August 2007 06:30 Go to previous message
Dhaval Giani is currently offline  Dhaval Giani
Messages: 37
Registered: June 2007
Member
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@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Previous Topic: [PATCH] Use helpers to obtain task pid in printks
Next Topic: [PATCH] Remove unused variables from fs/proc/base.c
Goto Forum:
  


Current Time: Sat Sep 13 02:22:21 GMT 2025

Total time taken to generate the page: 0.12476 seconds