mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Jingbo Xu <jefflexu@linux.alibaba.com>,
	xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com,
	linux-erofs@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 4/6] erofs: make the size of read data stored in buffer_ofs
Date: Thu, 1 Jun 2023 11:29:58 +0800	[thread overview]
Message-ID: <3997637a-b83a-627e-c2be-6beed51f9651@linux.alibaba.com> (raw)
In-Reply-To: <20230601024347.108469-5-jefflexu@linux.alibaba.com>



On 2023/6/1 10:43, Jingbo Xu wrote:
> Since now xattr_iter structures have been unified, make the size of the
> read data stored in buffer_ofs.  Don't bother reusing buffer_size for
> this use, which may be confusing.
> 
> This is in preparation for the following further cleanup.
> 
> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>

Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>

Thanks,
Gao Xiang

> ---
>   fs/erofs/xattr.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/erofs/xattr.c b/fs/erofs/xattr.c
> index a691d539ae4f..19f9bf67440c 100644
> --- a/fs/erofs/xattr.c
> +++ b/fs/erofs/xattr.c
> @@ -337,7 +337,7 @@ static int xattr_checkbuffer(struct erofs_xattr_iter *it,
>   {
>   	int err = it->buffer_size < value_sz ? -ERANGE : 0;
>   
> -	it->buffer_size = value_sz;
> +	it->buffer_ofs = value_sz;
>   	return !it->buffer ? 1 : err;
>   }
>   
> @@ -370,7 +370,7 @@ static int inline_getxattr(struct inode *inode, struct erofs_xattr_iter *it)
>   		if (ret != -ENOATTR)
>   			break;
>   	}
> -	return ret ? ret : it->buffer_size;
> +	return ret ? ret : it->buffer_ofs;
>   }
>   
>   static int shared_getxattr(struct inode *inode, struct erofs_xattr_iter *it)
> @@ -392,7 +392,7 @@ static int shared_getxattr(struct inode *inode, struct erofs_xattr_iter *it)
>   		if (ret != -ENOATTR)
>   			break;
>   	}
> -	return ret ? ret : it->buffer_size;
> +	return ret ? ret : it->buffer_ofs;
>   }
>   
>   static bool erofs_xattr_user_list(struct dentry *dentry)

  reply	other threads:[~2023-06-01  3:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01  2:43 [PATCH v5 0/6] erofs: cleanup of xattr handling Jingbo Xu
2023-06-01  2:43 ` [PATCH v5 1/6] erofs: convert erofs_read_metabuf() to erofs_bread() for xattr Jingbo Xu
2023-06-01  3:01   ` Gao Xiang
2023-06-01  2:43 ` [PATCH v5 2/6] erofs: enhance erofs_xattr_iter_fixup() helper Jingbo Xu
2023-06-01  3:03   ` Gao Xiang
2023-06-01  2:43 ` [PATCH v5 3/6] erofs: unify xattr_iter structures Jingbo Xu
2023-06-01  3:26   ` Gao Xiang
2023-06-01  2:43 ` [PATCH v5 4/6] erofs: make the size of read data stored in buffer_ofs Jingbo Xu
2023-06-01  3:29   ` Gao Xiang [this message]
2023-06-01  2:43 ` [PATCH v5 5/6] erofs: unify inline/share xattr iterators for listxattr/getxattr Jingbo Xu
2023-06-01  2:43 ` [PATCH v5 6/6] erofs: use separate xattr parsers " Jingbo Xu
2023-06-01  3:37   ` Gao Xiang

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=3997637a-b83a-627e-c2be-6beed51f9651@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=chao@kernel.org \
    --cc=huyue2@coolpad.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiang@kernel.org \
    /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

Powered by JetHome