erofs: use wrapper i_blocksize() in erofs_file_read_iter()

Yue Hu zbestahu at gmail.com
Thu Mar 9 18:37:09 AEDT 2023


On Thu,  9 Mar 2023 15:15:15 +0800
Yangtao Li <frank.li at vivo.com> wrote:

> > @@ -380,7 +380,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;  
> 
> Since the mask is to be obtained here, is it more appropriate to use GENMASK(inode->i_blkbits - 1, 0)?

It should be another change independently to this patch. rt?

> 
> Thx,
> Yangtao



More information about the Linux-erofs mailing list