LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: <ntfs3@lists.linux.dev>
Cc: <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>
Subject: [PATCH 1/3] fs/ntfs3: Use available posix_acl_release instead of ntfs_posix_acl_release
Date: Fri, 24 Sep 2021 19:14:53 +0300	[thread overview]
Message-ID: <bd40adc5-67c7-0f47-ed6f-da2540202de0@paragon-software.com> (raw)
In-Reply-To: <eb131ee0-3e89-da58-650c-5b84dd792a49@paragon-software.com>

We don't need to maintain ntfs_posix_acl_release.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
---
 fs/ntfs3/xattr.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c
index 83bbee277e12..253a07d9aa7b 100644
--- a/fs/ntfs3/xattr.c
+++ b/fs/ntfs3/xattr.c
@@ -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)
@@ -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;
 }
 
-- 
2.33.0



  reply	other threads:[~2021-09-24 16:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 16:13 [PATCH 0/3] fs/ntfs3: Refactoring of xattr.c Konstantin Komarov
2021-09-24 16:14 ` Konstantin Komarov [this message]
2021-09-25  8:50   ` [PATCH 1/3] fs/ntfs3: Use available posix_acl_release instead of ntfs_posix_acl_release Kari Argillander
2021-09-24 16:15 ` [PATCH 2/3] fs/ntfs3: Remove locked argument in ntfs_set_ea Konstantin Komarov
2021-09-25  8:49   ` Kari Argillander
2021-09-27 15:10     ` Konstantin Komarov
2021-09-27 19:10       ` Kari Argillander
2021-09-28 18:01         ` Konstantin Komarov
2021-09-28 18:13           ` Kari Argillander
2021-09-24 16:16 ` [PATCH 3/3] fs/ntfs3: Refactoring of ntfs_set_ea Konstantin Komarov
2021-09-24 16:31   ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd40adc5-67c7-0f47-ed6f-da2540202de0@paragon-software.com \
    --to=almaz.alexandrovich@paragon-software.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    --subject='Re: [PATCH 1/3] fs/ntfs3: Use available posix_acl_release instead of ntfs_posix_acl_release' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).