if (type == ACL_TYPE_ACCESS) {
umode_t mode = inode->i_mode;
+ struct posix_acl *old_acl = acl;
error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
+ if (!acl)
+ posix_acl_release(old_acl);
if (error)
goto out_release;
return rc;
}
if (acl) {
+ struct posix_acl *old_acl = acl;
rc = posix_acl_update_mode(inode, &inode->i_mode, &acl);
- posix_acl_release(acl);
+ posix_acl_release(old_acl);
if (rc) {
printk(KERN_ERR
"posix_acl_update_mode returned %d\n",
if (type == ACL_TYPE_ACCESS) {
umode_t mode = inode->i_mode;
+ 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;
error = xfs_set_mode(inode, mode);