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

From: Arjan van de Ven
Date: Tue May 30 2006 - 17:55:21 EST


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@xxxxxxxxxxxxxxx>
---
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)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/