summaryrefslogtreecommitdiffstats
path: root/kernel/fs/ext2
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/ext2')
-rw-r--r--kernel/fs/ext2/acl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/kernel/fs/ext2/acl.c b/kernel/fs/ext2/acl.c
index 27695e6f4..d6aeb84e9 100644
--- a/kernel/fs/ext2/acl.c
+++ b/kernel/fs/ext2/acl.c
@@ -193,15 +193,11 @@ ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
case ACL_TYPE_ACCESS:
name_index = EXT2_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 = CURRENT_TIME_SEC;
- mark_inode_dirty(inode);
- if (error == 0)
- acl = NULL;
- }
+ inode->i_ctime = CURRENT_TIME_SEC;
+ mark_inode_dirty(inode);
}
break;