summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/reiserfs/xattr_acl.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c
index 3d2256a425ee..d92a1dc6ee70 100644
--- a/fs/reiserfs/xattr_acl.c
+++ b/fs/reiserfs/xattr_acl.c
@@ -37,7 +37,14 @@ reiserfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
37 error = journal_begin(&th, inode->i_sb, jcreate_blocks); 37 error = journal_begin(&th, inode->i_sb, jcreate_blocks);
38 reiserfs_write_unlock(inode->i_sb); 38 reiserfs_write_unlock(inode->i_sb);
39 if (error == 0) { 39 if (error == 0) {
40 if (type == ACL_TYPE_ACCESS && acl) {
41 error = posix_acl_update_mode(inode, &inode->i_mode,
42 &acl);
43 if (error)
44 goto unlock;
45 }
40 error = __reiserfs_set_acl(&th, inode, type, acl); 46 error = __reiserfs_set_acl(&th, inode, type, acl);
47unlock:
41 reiserfs_write_lock(inode->i_sb); 48 reiserfs_write_lock(inode->i_sb);
42 error2 = journal_end(&th); 49 error2 = journal_end(&th);
43 reiserfs_write_unlock(inode->i_sb); 50 reiserfs_write_unlock(inode->i_sb);
@@ -241,11 +248,6 @@ __reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode,
241 switch (type) { 248 switch (type) {
242 case ACL_TYPE_ACCESS: 249 case ACL_TYPE_ACCESS:
243 name = XATTR_NAME_POSIX_ACL_ACCESS; 250 name = XATTR_NAME_POSIX_ACL_ACCESS;
244 if (acl) {
245 error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
246 if (error)
247 return error;
248 }
249 break; 251 break;
250 case ACL_TYPE_DEFAULT: 252 case ACL_TYPE_DEFAULT:
251 name = XATTR_NAME_POSIX_ACL_DEFAULT; 253 name = XATTR_NAME_POSIX_ACL_DEFAULT;