[PATCH] erofs: remove useless src in erofs_xattr_copy_to_buffer()

Ferry Meng
2025-12-29T10:05:21Z

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