Skip to content

Commit 3993f4f

Browse files
taigerhuhsiangkao
authored andcommitted
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>
1 parent 9ff4718 commit 3993f4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/erofs/data.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
376376
if (bdev)
377377
blksize_mask = bdev_logical_block_size(bdev) - 1;
378378
else
379-
blksize_mask = (1 << inode->i_blkbits) - 1;
379+
blksize_mask = i_blocksize(inode) - 1;
380380

381381
if ((iocb->ki_pos | iov_iter_count(to) |
382382
iov_iter_alignment(to)) & blksize_mask)

0 commit comments

Comments
 (0)