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 <[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]>
1 parent 9ff4718 commit 3993f4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)