summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorYue Hu <huyue2@coolpad.com>2023-03-06 15:55:27 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2023-03-09 23:36:04 +0800
commit3993f4f456309580445bb515fbc609d995b6a3ae (patch)
tree83bfab650400131c641561ab048d3c42acde664f /fs
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 <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')
-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)