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>
This commit is contained in:
parent
9ff471800b
commit
3993f4f456
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user