summaryrefslogtreecommitdiffstats
path: root/kernel/fs/xfs/xfs_acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/xfs/xfs_acl.c')
-rw-r--r--kernel/fs/xfs/xfs_acl.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/kernel/fs/xfs/xfs_acl.c b/kernel/fs/xfs/xfs_acl.c
index 6bb470fbb..c5101a329 100644
--- a/kernel/fs/xfs/xfs_acl.c
+++ b/kernel/fs/xfs/xfs_acl.c
@@ -288,16 +288,11 @@ xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
return error;
if (type == ACL_TYPE_ACCESS) {
- umode_t mode = inode->i_mode;
- error = posix_acl_equiv_mode(acl, &mode);
-
- if (error <= 0) {
- acl = NULL;
-
- if (error < 0)
- return error;
- }
+ umode_t mode;
+ error = posix_acl_update_mode(inode, &mode, &acl);
+ if (error)
+ return error;
error = xfs_set_mode(inode, mode);
if (error)
return error;