summaryrefslogtreecommitdiffstats
path: root/fs/erofs/data.c
diff options
context:
space:
mode:
authorYue Hu <huyue2@coolpad.com>2023-03-06 08:55:27 +0100
committerGao Xiang <hsiangkao@linux.alibaba.com>2023-03-09 16:36:04 +0100
commit3993f4f456309580445bb515fbc609d995b6a3ae (patch)
tree83bfab650400131c641561ab048d3c42acde664f /fs/erofs/data.c
parenterofs: get rid of a useless DBG_BUGON (diff)
downloadlinux-3993f4f456309580445bb515fbc609d995b6a3ae.tar.xz
linux-3993f4f456309580445bb515fbc609d995b6a3ae.zip
erofs: use wrapper i_blocksize() in erofs_file_read_iter()
linux/fs.h has a wrapper for this operation. Signed-off-by: Yue Hu <huyue2@coolpad.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Reviewed-by: Chao Yu <chao@kernel.org> Link: https://lore.kernel.org/r/20230306075527.1338-1-zbestahu@gmail.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/data.c')
-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)