erofs: remove useless src in erofs_xattr_copy_to_buffer()
PATCH 1/1 erofs: remove useless src in erofs_xattr_copy_to_buffer()
Use it->kaddr directly.
Signed-off-by Ferry Meng <[email protected]>
--- fs/erofs/xattr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
fs/erofs/xattr.c +1 -3
@@ -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; }
Signature · 1 line
2.19.1.6.gb485710b
Quoted 3 lines · Ferry Meng
Use
it->kaddrdirectly.Signed-off-by Ferry Meng <[email protected]>
Reviewed-by Hongbo Li <[email protected]>
Thanks,
Hongbo
Quoted 27 lines
--- fs/erofs/xattr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)fs/erofs/xattr.c +1
-3@@ -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; }
Quoted 3 lines · Ferry Meng
Use
it->kaddrdirectly.Signed-off-by Ferry Meng <[email protected]>
Reviewed-by Gao Xiang <[email protected]>
Thanks,
Gao Xiang
Quoted 3 lines · Ferry Meng
Use
it->kaddrdirectly.Signed-off-by Ferry Meng <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,