fs/ntfs3: Use available posix_acl_release instead of ntfs_posix_acl_release
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Fri, 24 Sep 2021 14:47:04 +0000 (17:47 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 5 Oct 2021 13:39:17 +0000 (16:39 +0300)
We don't need to maintain ntfs_posix_acl_release.

Reviewed-by: Kari Argillander <kari.argillander@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/xattr.c

index 83bbee277e12ec795dde29cf279b7eb96af961bc..253a07d9aa7b359fcb0296e859a57b0dc5492c30 100644 (file)
@@ -475,12 +475,6 @@ out:
 }
 
 #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)
@@ -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;
 }
@@ -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;
 }