summaryrefslogtreecommitdiffstats
path: root/kernel/fs/ext4/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/ext4/acl.c')
-rw-r--r--kernel/fs/ext4/acl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/kernel/fs/ext4/acl.c b/kernel/fs/ext4/acl.c
index 69b1e7302..c3fe1e323 100644
--- a/kernel/fs/ext4/acl.c
+++ b/kernel/fs/ext4/acl.c
@@ -196,15 +196,11 @@ __ext4_set_acl(handle_t *handle, struct inode *inode, int type,
case ACL_TYPE_ACCESS:
name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS;
if (acl) {
- error = posix_acl_equiv_mode(acl, &inode->i_mode);
- if (error < 0)
+ error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
+ if (error)
return error;
- else {
- inode->i_ctime = ext4_current_time(inode);
- ext4_mark_inode_dirty(handle, inode);
- if (error == 0)
- acl = NULL;
- }
+ inode->i_ctime = ext4_current_time(inode);
+ ext4_mark_inode_dirty(handle, inode);
}
break;