From: Ferry Meng <mengferry@linux.alibaba.com>
To: linux-erofs@lists.ozlabs.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Ferry Meng <mengferry@linux.alibaba.com>
Subject: [PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer()
Date: Mon, 29 Dec 2025 18:05:15 +0800 [thread overview]
Message-ID: <20251229100515.111287-1-mengferry@linux.alibaba.com> (raw)
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
next reply other threads:[~2025-12-29 10:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-29 10:05 Ferry Meng [this message]
2025-12-30 2:41 ` [PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer() Gao Xiang
2026-01-22 9:09 ` Chao Yu
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=20251229100515.111287-1-mengferry@linux.alibaba.com \
--to=mengferry@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.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