diff options
Diffstat (limited to 'fs/xfs/xfs_acl.c')
-rw-r--r-- | fs/xfs/xfs_acl.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 4b641676f258..e80dbfa2a7b9 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c | |||
@@ -284,16 +284,11 @@ xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
284 | return error; | 284 | return error; |
285 | 285 | ||
286 | if (type == ACL_TYPE_ACCESS) { | 286 | if (type == ACL_TYPE_ACCESS) { |
287 | umode_t mode = inode->i_mode; | 287 | umode_t mode; |
288 | error = posix_acl_equiv_mode(acl, &mode); | ||
289 | |||
290 | if (error <= 0) { | ||
291 | acl = NULL; | ||
292 | |||
293 | if (error < 0) | ||
294 | return error; | ||
295 | } | ||
296 | 288 | ||
289 | error = posix_acl_update_mode(inode, &mode, &acl); | ||
290 | if (error) | ||
291 | return error; | ||
297 | error = xfs_set_mode(inode, mode); | 292 | error = xfs_set_mode(inode, mode); |
298 | if (error) | 293 | if (error) |
299 | return error; | 294 | return error; |