[PATCH 2/5] fs/mpage: avoid negative shift for large blocksize

Matthew Wilcox willy at infradead.org
Fri May 10 15:24:06 PDT 2024


On Fri, May 10, 2024 at 12:29:03PM +0200, hare at kernel.org wrote:
> -	block_in_file = (sector_t)folio->index << (PAGE_SHIFT - blkbits);
> +	block_in_file = (sector_t)(((loff_t)folio->index << PAGE_SHIFT) >> blkbits);

	block_in_file = folio_pos(folio) >> blkbits;




More information about the Linux-nvme mailing list