Skip to content

Commit

Permalink
fs/ntfs3: Use available posix_acl_release instead of ntfs_posix_acl_r…
Browse files Browse the repository at this point in the history
…elease

We don't need to maintain ntfs_posix_acl_release.

Reviewed-by: Kari Argillander <[email protected]>
Signed-off-by: Konstantin Komarov <[email protected]>
  • Loading branch information
aalexandrovich committed Oct 5, 2021
1 parent 35afb70 commit b1e0c55
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions fs/ntfs3/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,6 @@ static noinline int ntfs_set_ea(struct inode *inode, const char *name,
}

#ifdef CONFIG_NTFS3_FS_POSIX_ACL
static inline void ntfs_posix_acl_release(struct posix_acl *acl)
{
if (acl && refcount_dec_and_test(&acl->a_refcount))
kfree(acl);
}

static struct posix_acl *ntfs_get_acl_ex(struct user_namespace *mnt_userns,
struct inode *inode, int type,
int locked)
Expand Down Expand Up @@ -641,7 +635,7 @@ static int ntfs_xattr_get_acl(struct user_namespace *mnt_userns,
return -ENODATA;

err = posix_acl_to_xattr(mnt_userns, acl, buffer, size);
ntfs_posix_acl_release(acl);
posix_acl_release(acl);

return err;
}
Expand Down Expand Up @@ -678,7 +672,7 @@ static int ntfs_xattr_set_acl(struct user_namespace *mnt_userns,
err = ntfs_set_acl(mnt_userns, inode, acl, type);

release_and_out:
ntfs_posix_acl_release(acl);
posix_acl_release(acl);
return err;
}

Expand Down

0 comments on commit b1e0c55

Please sign in to comment.