aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYue Hu <[email protected]>2023-03-06 15:55:27 +0800
committerGao Xiang <[email protected]>2023-03-09 23:36:04 +0800
commit3993f4f456309580445bb515fbc609d995b6a3ae (patch)
tree83bfab650400131c641561ab048d3c42acde664f
parent9ff471800b74f5f952c7e75a0355f1d30ee2b046 (diff)
erofs: use wrapper i_blocksize() in erofs_file_read_iter()
linux/fs.h has a wrapper for this operation. Signed-off-by: Yue Hu <[email protected]> Reviewed-by: Gao Xiang <[email protected]> Reviewed-by: Chao Yu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Gao Xiang <[email protected]>
-rw-r--r--fs/erofs/data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/erofs/data.c b/fs/erofs/data.c
index e16545849ea7..c08c0f578bc6 100644
--- a/fs/erofs/data.c
+++ b/fs/erofs/data.c
@@ -376,7 +376,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
if (bdev)
blksize_mask = bdev_logical_block_size(bdev) - 1;
else
- blksize_mask = (1 << inode->i_blkbits) - 1;
+ blksize_mask = i_blocksize(inode) - 1;
if ((iocb->ki_pos | iov_iter_count(to) |
iov_iter_alignment(to)) & blksize_mask)