reiserfs: make per-inode xattr locking more fine grained
The per-inode locking can be made more fine-grained to surround just the
interaction with the filesystem itself. This really only applies to
protecting reads during a write, since concurrent writes are barred with
inode->i_mutex at the vfs level.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c
index d63b2c5..d3ce6ee 100644
--- a/fs/reiserfs/xattr_acl.c
+++ b/fs/reiserfs/xattr_acl.c
@@ -418,9 +418,7 @@
int ret = 0;
if (reiserfs_posixacl(inode->i_sb) && !IS_PRIVATE(inode)) {
struct posix_acl *acl;
- reiserfs_read_lock_xattr_i(inode);
acl = reiserfs_get_acl(inode, ACL_TYPE_DEFAULT);
- reiserfs_read_unlock_xattr_i(inode);
ret = (acl && !IS_ERR(acl));
if (ret)
posix_acl_release(acl);
@@ -452,11 +450,8 @@
if (!clone)
return -ENOMEM;
error = posix_acl_chmod_masq(clone, inode->i_mode);
- if (!error) {
- reiserfs_write_lock_xattr_i(inode);
+ if (!error)
error = reiserfs_set_acl(inode, ACL_TYPE_ACCESS, clone);
- reiserfs_write_unlock_xattr_i(inode);
- }
posix_acl_release(clone);
return error;
}