Re: [PATCH v2 5/5] zram: use generic PAGE_SECTORS and PAGE_SECTORS_SHIFT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26.05.23 09:34, Luis Chamberlain wrote:
> +	u32 index = bio->bi_iter.bi_sector >> PAGE_SECTORS_SHIFT;
> +	u32 offset = (bio->bi_iter.bi_sector & (PAGE_SECTORS - 1)) <<
>  			SECTOR_SHIFT;

(PAGE_SECTORS - 1) is SECTOR_MASK, please use this.

Thanks,
	Johannes




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux