[Cbe-oss-dev] [PATCH] spufs: lockdir annotations for spufs_dir_close

Christoph Hellwig hch at lst.de
Wed May 7 20:39:01 EST 2008


We need to acquire the parent i_mutex with I_MUTEX_PARENT to keep
lockdep happy.


Signed-off-by: Christoph Hellwig <hch at lst.de>

Index: spufs-kernel.org/arch/powerpc/platforms/cell/spufs/inode.c
===================================================================
--- spufs-kernel.org.orig/arch/powerpc/platforms/cell/spufs/inode.c	2008-05-05 11:15:51.000000000 +0200
+++ spufs-kernel.org/arch/powerpc/platforms/cell/spufs/inode.c	2008-05-05 11:16:41.000000000 +0200
@@ -223,7 +223,7 @@ static int spufs_dir_close(struct inode 
 	parent = dir->d_parent->d_inode;
 	ctx = SPUFS_I(dir->d_inode)->i_ctx;
 
-	mutex_lock(&parent->i_mutex);
+	mutex_lock_nested(&parent->i_mutex, I_MUTEX_PARENT);
 	ret = spufs_rmdir(parent, dir);
 	mutex_unlock(&parent->i_mutex);
 	WARN_ON(ret);



More information about the cbe-oss-dev mailing list