 cf-namei.c |    2 +-
 cf-proc.c  |    2 +-
 cf-xattr.c |    1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

Index: linux-2.6.18.x86_64/fs/cachefiles/cf-proc.c
===================================================================
--- linux-2.6.18.x86_64.orig/fs/cachefiles/cf-proc.c	2006-10-26 11:41:13.000000000 +0530
+++ linux-2.6.18.x86_64/fs/cachefiles/cf-proc.c	2006-10-26 11:45:33.000000000 +0530
@@ -248,7 +248,7 @@
 	return ret;
 
 found_command:
-	mutex_lock(&file->f_dentry->d_inode->i_mutex);
+	mutex_lock_nested(&file->f_dentry->d_inode->i_mutex, I_MUTEX_PARENT);
 
 	ret = -EIO;
 	if (!test_bit(CACHEFILES_DEAD, &cache->flags))
Index: linux-2.6.18.x86_64/fs/cachefiles/cf-namei.c
===================================================================
--- linux-2.6.18.x86_64.orig/fs/cachefiles/cf-namei.c	2006-10-26 11:41:13.000000000 +0530
+++ linux-2.6.18.x86_64/fs/cachefiles/cf-namei.c	2006-10-26 11:46:24.000000000 +0530
@@ -581,7 +581,7 @@
 	current->fsuid = 0;
 	current->fsgid = 0;
 
-	mutex_lock(&dir->d_inode->i_mutex);
+	mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_CHILD);
 
 	subdir = d_lookup(dir, &name);
 	if (!subdir) {
Index: linux-2.6.18.x86_64/fs/cachefiles/cf-xattr.c
===================================================================
--- linux-2.6.18.x86_64.orig/fs/cachefiles/cf-xattr.c	2006-10-26 11:41:13.000000000 +0530
+++ linux-2.6.18.x86_64/fs/cachefiles/cf-xattr.c	2006-10-26 11:48:25.000000000 +0530
@@ -52,7 +52,6 @@
 	if (ret == 0) {
 		_debug("SET");
 		fsnotify_xattr(dentry);
-		mutex_unlock(&dentry->d_inode->i_mutex);
 		goto error;
 	}
 
