lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bee8eb33-ec23-de1c-0340-b2cc290f4d1c@linux.alibaba.com>
Date:   Thu, 9 Mar 2023 15:36:58 +0800
From:   Jingbo Xu <jefflexu@...ux.alibaba.com>
To:     Yangtao Li <frank.li@...o.com>, zbestahu@...il.com
Cc:     chao@...nel.org, huyue2@...lpad.com, linux-erofs@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org, xiang@...nel.org,
        zhangwen@...lpad.com
Subject: Re: erofs: use wrapper i_blocksize() in erofs_file_read_iter()



On 3/9/23 3:15 PM, Yangtao Li 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)?


FYI it seems that GENMASK macro is widely used in driver and arch code
base, while it's rarely used in fs, except for f2fs.

-- 
Thanks,
Jingbo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ