* [PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer()
@ 2025-12-29 10:05 Ferry Meng
2025-12-29 13:09 ` Hongbo Li
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ferry Meng @ 2025-12-29 10:05 UTC (permalink / raw)
To: linux-erofs; +Cc: LKML, Ferry Meng
Use it->kaddr directly.
Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>
---
fs/erofs/xattr.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/erofs/xattr.c b/fs/erofs/xattr.c
index 396536d9a862..c5c481b3f32d 100644
--- a/fs/erofs/xattr.c
+++ b/fs/erofs/xattr.c
@@ -182,17 +182,15 @@ static int erofs_xattr_copy_to_buffer(struct erofs_xattr_iter *it,
{
unsigned int slice, processed;
struct super_block *sb = it->sb;
- void *src;
for (processed = 0; processed < len; processed += slice) {
it->kaddr = erofs_bread(&it->buf, it->pos, true);
if (IS_ERR(it->kaddr))
return PTR_ERR(it->kaddr);
- src = it->kaddr;
slice = min_t(unsigned int, sb->s_blocksize -
erofs_blkoff(sb, it->pos), len - processed);
- memcpy(it->buffer + it->buffer_ofs, src, slice);
+ memcpy(it->buffer + it->buffer_ofs, it->kaddr, slice);
it->buffer_ofs += slice;
it->pos += slice;
}
--
2.19.1.6.gb485710b
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer()
2025-12-29 10:05 [PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer() Ferry Meng
@ 2025-12-29 13:09 ` Hongbo Li
2025-12-30 2:41 ` Gao Xiang
2026-01-22 9:09 ` Chao Yu
2 siblings, 0 replies; 4+ messages in thread
From: Hongbo Li @ 2025-12-29 13:09 UTC (permalink / raw)
To: linux-erofs
On 2025/12/29 18:05, Ferry Meng wrote:
> Use it->kaddr directly.
>
> Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>
Reviewed-by: Hongbo Li <lihongbo22@huawei.com>
Thanks,
Hongbo
> ---
> fs/erofs/xattr.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/erofs/xattr.c b/fs/erofs/xattr.c
> index 396536d9a862..c5c481b3f32d 100644
> --- a/fs/erofs/xattr.c
> +++ b/fs/erofs/xattr.c
> @@ -182,17 +182,15 @@ static int erofs_xattr_copy_to_buffer(struct erofs_xattr_iter *it,
> {
> unsigned int slice, processed;
> struct super_block *sb = it->sb;
> - void *src;
>
> for (processed = 0; processed < len; processed += slice) {
> it->kaddr = erofs_bread(&it->buf, it->pos, true);
> if (IS_ERR(it->kaddr))
> return PTR_ERR(it->kaddr);
>
> - src = it->kaddr;
> slice = min_t(unsigned int, sb->s_blocksize -
> erofs_blkoff(sb, it->pos), len - processed);
> - memcpy(it->buffer + it->buffer_ofs, src, slice);
> + memcpy(it->buffer + it->buffer_ofs, it->kaddr, slice);
> it->buffer_ofs += slice;
> it->pos += slice;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer()
2025-12-29 10:05 [PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer() Ferry Meng
2025-12-29 13:09 ` Hongbo Li
@ 2025-12-30 2:41 ` Gao Xiang
2026-01-22 9:09 ` Chao Yu
2 siblings, 0 replies; 4+ messages in thread
From: Gao Xiang @ 2025-12-30 2:41 UTC (permalink / raw)
To: Ferry Meng, linux-erofs; +Cc: LKML
On 2025/12/29 18:05, Ferry Meng wrote:
> Use it->kaddr directly.
>
> Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Thanks,
Gao Xiang
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer()
2025-12-29 10:05 [PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer() Ferry Meng
2025-12-29 13:09 ` Hongbo Li
2025-12-30 2:41 ` Gao Xiang
@ 2026-01-22 9:09 ` Chao Yu
2 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2026-01-22 9:09 UTC (permalink / raw)
To: Ferry Meng, linux-erofs; +Cc: chao, LKML
On 12/29/2025 6:05 PM, Ferry Meng wrote:
> Use it->kaddr directly.
>
> Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-22 9:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-29 10:05 [PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer() Ferry Meng
2025-12-29 13:09 ` Hongbo Li
2025-12-30 2:41 ` Gao Xiang
2026-01-22 9:09 ` Chao Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.