diff options
Diffstat (limited to 'fs/xfs/xfs_acl.c')
| -rw-r--r-- | fs/xfs/xfs_acl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 0c59d960efe..5e9a9a62a45 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c @@ -392,10 +392,11 @@ xfs_xattr_acl_set(struct dentry *dentry, const char *name, struct posix_acl *old_acl = acl; error = posix_acl_update_mode(inode, &mode, &acl); - if (!acl) - posix_acl_release(old_acl); + if (error) goto out_release; + if (!acl) + posix_acl_release(old_acl); error = xfs_set_mode(inode, mode); if (error) |
