aboutsummaryrefslogtreecommitdiff
path: root/fs/reiserfs/xattr_acl.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2018-02-01 12:02:34 +0800
committerAlex Shi <alex.shi@linaro.org>2018-02-01 12:02:34 +0800
commita40f2a595adfe0be6ced06fdb4c4a24ae3291a91 (patch)
tree4e99ec8bd3ce134bdbafd54a0fc873f11c33e21b /fs/reiserfs/xattr_acl.c
parent293c379504006b5ea8b4e7109ba4ebc3211f9b91 (diff)
parent49fe90b853dfb1087d0a734cd7f4af1aa00c8e53 (diff)
Merge tag 'v4.4.114' into linux-linaro-lsk-v4.4lsk-v4.4-18.02
This is the 4.4.114 stable release
Diffstat (limited to 'fs/reiserfs/xattr_acl.c')
-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 9b1824f35501..91b036902a17 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)
error = journal_begin(&th, inode->i_sb, jcreate_blocks);
reiserfs_write_unlock(inode->i_sb);
if (error == 0) {
+ if (type == ACL_TYPE_ACCESS && acl) {
+ error = posix_acl_update_mode(inode, &inode->i_mode,
+ &acl);
+ if (error)
+ goto unlock;
+ }
error = __reiserfs_set_acl(&th, inode, type, acl);
+unlock:
reiserfs_write_lock(inode->i_sb);
error2 = journal_end(&th);
reiserfs_write_unlock(inode->i_sb);
@@ -245,11 +252,6 @@ __reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode,
switch (type) {
case ACL_TYPE_ACCESS:
name = POSIX_ACL_XATTR_ACCESS;
- if (acl) {
- error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
- if (error)
- return error;
- }
break;
case ACL_TYPE_DEFAULT:
name = POSIX_ACL_XATTR_DEFAULT;