ntfs3.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Kari Argillander <kari.argillander@gmail.com>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/5] fs/ntfs3: Refactor ntfs_get_acl_ex for better readability
Date: Wed, 22 Sep 2021 20:47:56 +0300	[thread overview]
Message-ID: <20210922174756.cgj66om2qro4ms3j@kari-VirtualBox> (raw)
In-Reply-To: <994cb658-d2f8-a797-e947-35ac0a203ea2@paragon-software.com>

On Wed, Sep 22, 2021 at 07:18:18PM +0300, Konstantin Komarov wrote:

There should almoust always still be commit message. Even "small"
change. You have now see that people send you patch which change
just one line, but it can still contain many lines commit message.

> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
> ---
>  fs/ntfs3/xattr.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c
> index 5c7c5c7a5ec1..3795943efc8e 100644
> --- a/fs/ntfs3/xattr.c
> +++ b/fs/ntfs3/xattr.c
> @@ -518,12 +518,15 @@ static struct posix_acl *ntfs_get_acl_ex(struct user_namespace *mnt_userns,
>  	/* Translate extended attribute to acl. */
>  	if (err >= 0) {

If err was ENODATA ...

>  		acl = posix_acl_from_xattr(mnt_userns, buf, err);
> -		if (!IS_ERR(acl))
> -			set_cached_acl(inode, type, acl);
> +	} else if (err == -ENODATA) {
> +		acl = NULL;
>  	} else {
> -		acl = err == -ENODATA ? NULL : ERR_PTR(err);

Before we get this and we did not call set_cached_acl().

> +		acl = ERR_PTR(err);
>  	}
>  
> +	if (!IS_ERR(acl))

But now we call it with new logic. If this is correct then you change
behavier little bit. I let you talk before I look more into this.

> +		set_cached_acl(inode, type, acl);
> +
>  	__putname(buf);
>  
>  	return acl;
> -- 
> 2.33.0
> 
> 

  reply	other threads:[~2021-09-22 17:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 16:15 [PATCH 0/5] Refactor locking in inode_operations Konstantin Komarov
2021-09-22 16:17 ` [PATCH 1/5] fs/ntfs3: Move ni_lock_dir and ni_unlock into ntfs_create_inode Konstantin Komarov
2021-09-22 18:12   ` Kari Argillander
2021-09-22 16:18 ` [PATCH 2/5] fs/ntfs3: Refactor ntfs_get_acl_ex for better readability Konstantin Komarov
2021-09-22 17:47   ` Kari Argillander [this message]
2021-09-22 16:19 ` [PATCH 3/5] fs/ntfs3: Pass flags to ntfs_set_ea in ntfs_set_acl_ex Konstantin Komarov
2021-09-22 17:59   ` Kari Argillander
2021-09-22 16:20 ` [PATCH 4/5] fs/ntfs3: Change posix_acl_equiv_mode to posix_acl_update_mode Konstantin Komarov
2021-09-22 18:23   ` Kari Argillander
2021-09-22 16:20 ` [PATCH 5/5] fs/ntfs3: Refactoring lock in ntfs_init_acl Konstantin Komarov
2021-09-22 18:41   ` Kari Argillander
2021-09-22 18:51 ` [PATCH 0/5] Refactor locking in inode_operations Kari Argillander

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=20210922174756.cgj66om2qro4ms3j@kari-VirtualBox \
    --to=kari.argillander@gmail.com \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).