diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_acl.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_acl.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/xfs/linux-2.6/xfs_acl.c b/fs/xfs/linux-2.6/xfs_acl.c index 13c4e4fd5c6e..4c554122db02 100644 --- a/fs/xfs/linux-2.6/xfs_acl.c +++ b/fs/xfs/linux-2.6/xfs_acl.c | |||
@@ -326,7 +326,7 @@ xfs_inherit_acl(struct inode *inode, struct posix_acl *default_acl) | |||
326 | int | 326 | int |
327 | xfs_acl_chmod(struct inode *inode) | 327 | xfs_acl_chmod(struct inode *inode) |
328 | { | 328 | { |
329 | struct posix_acl *acl, *clone; | 329 | struct posix_acl *acl; |
330 | int error; | 330 | int error; |
331 | 331 | ||
332 | if (S_ISLNK(inode->i_mode)) | 332 | if (S_ISLNK(inode->i_mode)) |
@@ -336,16 +336,12 @@ xfs_acl_chmod(struct inode *inode) | |||
336 | if (IS_ERR(acl) || !acl) | 336 | if (IS_ERR(acl) || !acl) |
337 | return PTR_ERR(acl); | 337 | return PTR_ERR(acl); |
338 | 338 | ||
339 | clone = posix_acl_clone(acl, GFP_KERNEL); | 339 | error = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode); |
340 | posix_acl_release(acl); | 340 | if (error) |
341 | if (!clone) | 341 | return error; |
342 | return -ENOMEM; | ||
343 | |||
344 | error = posix_acl_chmod_masq(clone, inode->i_mode); | ||
345 | if (!error) | ||
346 | error = xfs_set_acl(inode, ACL_TYPE_ACCESS, clone); | ||
347 | 342 | ||
348 | posix_acl_release(clone); | 343 | error = xfs_set_acl(inode, ACL_TYPE_ACCESS, acl); |
344 | posix_acl_release(acl); | ||
349 | return error; | 345 | return error; |
350 | } | 346 | } |
351 | 347 | ||