Skip to contentSkip to conversation

reiserfs: Don't call reiserfs_get_acl() with the reiserfs lock

PATCH New Frederic Weisbecker 1 participant 1 message Jan 7, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reiserfs: Don't call reiserfs_get_acl() with the reiserfs lock

reiserfs_get_acl is usually not called under the reiserfs lock, as it doesn't need it. But it happens when it is called by reiserfs_acl_chmod(), which creates a dependency inversion against the private xattr inodes mutexes for the given inode.

We need to call it without the reiserfs lock, especially since it's unnecessary.

Cc Christian Kujau <[email protected]>
Cc Alexander Beregalov <[email protected]>
Cc Chris Mason <[email protected]>
Cc Ingo Molnar <[email protected]>
---
 fs/reiserfs/xattr_acl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/reiserfs/xattr_acl.c +2 -0
index 35d6e67..f559c9e 100644
@@ -452,7 +452,9 @@ int reiserfs_acl_chmod(struct inode *inode)
 		return 0;
 	}
 
+	reiserfs_write_unlock(inode->i_sb);
 	acl = reiserfs_get_acl(inode, ACL_TYPE_ACCESS);
+	reiserfs_write_lock(inode->i_sb);
 	if (!acl)
 		return 0;
 	if (IS_ERR(acl))
Signature · 1 line
1.6.2.3