diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-03-30 14:02:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 15:16:38 -0400 |
commit | 8b6dd72a441a683cef7ace93de0a57ced4367f00 (patch) | |
tree | 6bdeebd3a35d71db2c7ea3e48e3f617b5efbd81a /fs/reiserfs/xattr_acl.c | |
parent | d984561b326cd0fe0d1183d11b9b4fa1d011d21d (diff) |
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>
Diffstat (limited to 'fs/reiserfs/xattr_acl.c')
-rw-r--r-- | fs/reiserfs/xattr_acl.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c index d63b2c5850c3..d3ce6ee9b262 100644 --- a/fs/reiserfs/xattr_acl.c +++ b/fs/reiserfs/xattr_acl.c | |||
@@ -418,9 +418,7 @@ int reiserfs_cache_default_acl(struct inode *inode) | |||
418 | int ret = 0; | 418 | int ret = 0; |
419 | if (reiserfs_posixacl(inode->i_sb) && !IS_PRIVATE(inode)) { | 419 | if (reiserfs_posixacl(inode->i_sb) && !IS_PRIVATE(inode)) { |
420 | struct posix_acl *acl; | 420 | struct posix_acl *acl; |
421 | reiserfs_read_lock_xattr_i(inode); | ||
422 | acl = reiserfs_get_acl(inode, ACL_TYPE_DEFAULT); | 421 | acl = reiserfs_get_acl(inode, ACL_TYPE_DEFAULT); |
423 | reiserfs_read_unlock_xattr_i(inode); | ||
424 | ret = (acl && !IS_ERR(acl)); | 422 | ret = (acl && !IS_ERR(acl)); |
425 | if (ret) | 423 | if (ret) |
426 | posix_acl_release(acl); | 424 | posix_acl_release(acl); |
@@ -452,11 +450,8 @@ int reiserfs_acl_chmod(struct inode *inode) | |||
452 | if (!clone) | 450 | if (!clone) |
453 | return -ENOMEM; | 451 | return -ENOMEM; |
454 | error = posix_acl_chmod_masq(clone, inode->i_mode); | 452 | error = posix_acl_chmod_masq(clone, inode->i_mode); |
455 | if (!error) { | 453 | if (!error) |
456 | reiserfs_write_lock_xattr_i(inode); | ||
457 | error = reiserfs_set_acl(inode, ACL_TYPE_ACCESS, clone); | 454 | error = reiserfs_set_acl(inode, ACL_TYPE_ACCESS, clone); |
458 | reiserfs_write_unlock_xattr_i(inode); | ||
459 | } | ||
460 | posix_acl_release(clone); | 455 | posix_acl_release(clone); |
461 | return error; | 456 | return error; |
462 | } | 457 | } |