[Patch -rc5-mm1] Lockdep annotate rpc_populate for child-relationship of its mutex

Arjan van de Ven
2006-05-30T21:56:03Z

On Tue, 2006-05-30 at 14:14 -0700, Roland Dreier wrote:
> Here it is with KALLSYMS_ALL:

ok this ought to do it

rpc_populate is creating a child inode in a directory, and the
parent already has it's mutex locked. Similar to the VFS code
this needs I_MUTEX_CHILD nesting annotation

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
net/sunrpc/rpc_pipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.17-rc5-mm1-lockdep/net/sunrpc/rpc_pipe.c
===================================================================
--- linux-2.6.17-rc5-mm1-lockdep.orig/net/sunrpc/rpc_pipe.c
+++ linux-2.6.17-rc5-mm1-lockdep/net/sunrpc/rpc_pipe.c
@@ -557,7 +557,7 @@ rpc_populate(struct dentry *parent,
struct dentry *dentry;
int mode, i;

- mutex_lock(&dir->i_mutex);
+ mutex_lock_nested(&dir->i_mutex, I_MUTEX_CHILD);
for (i = start; i < eof; i++) {
dentry = d_alloc_name(parent, files[i].name);
if (!dentry)