summaryrefslogtreecommitdiffstats
path: root/fs/erofs/dir.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/dir.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/dir.c')
-rw-r--r--fs/erofs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/erofs/dir.c b/fs/erofs/dir.c
index b80abec0531a..9d38f39bb4f7 100644
--- a/fs/erofs/dir.c
+++ b/fs/erofs/dir.c
@@ -63,7 +63,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx)
struct erofs_dirent *de;
unsigned int nameoff, maxsize;
- de = erofs_bread(&buf, i, EROFS_KMAP);
+ de = erofs_bread(&buf, erofs_pos(sb, i), EROFS_KMAP);
if (IS_ERR(de)) {
erofs_err(sb, "fail to readdir of logical block %u of nid %llu",
i, EROFS_I(dir)->nid);