summaryrefslogtreecommitdiffstats
path: root/fs/erofs/zdata.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2024-04-07 03:04:50 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2024-04-07 03:04:50 -0400
commit469ad583c1293f5d9f45183050b3beeb4a8c3475 (patch)
treec1574e7e19e7c92ba206be0ca135a195df420bf4 /fs/erofs/zdata.c
parent39cd87c4eb2b893354f3b850f916353f2658ae6f (diff)
downloadlinux-469ad583c1293f5d9f45183050b3beeb4a8c3475.tar.gz
linux-469ad583c1293f5d9f45183050b3beeb4a8c3475.tar.bz2
linux-469ad583c1293f5d9f45183050b3beeb4a8c3475.zip
erofs: switch erofs_bread() to passing offset instead of block number
Callers are happier that way, especially since we no longer need to play with splitting offset into block number and offset within block, passing the former to erofs_bread(), then adding the latter... erofs_bread() always reads entire pages, anyway. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/erofs/zdata.c')
-rw-r--r--fs/erofs/zdata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 3216b920d369..9ffdae7fcd5b 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -940,12 +940,12 @@ static int z_erofs_read_fragment(struct super_block *sb, struct page *page,
for (; cur < end; cur += cnt, pos += cnt) {
cnt = min_t(unsigned int, end - cur,
sb->s_blocksize - erofs_blkoff(sb, pos));
- src = erofs_bread(&buf, erofs_blknr(sb, pos), EROFS_KMAP);
+ src = erofs_bread(&buf, pos, EROFS_KMAP);
if (IS_ERR(src)) {
erofs_put_metabuf(&buf);
return PTR_ERR(src);
}
- memcpy_to_page(page, cur, src + erofs_blkoff(sb, pos), cnt);
+ memcpy_to_page(page, cur, src, cnt);
}
erofs_put_metabuf(&buf);
return 0;