On Wed, May 17, 2023 at 04:47:01PM +0200, Pankaj Raghav wrote: > > @@ -1793,7 +1793,7 @@ int __block_write_full_page(struct inode *inode, struct page *page, > > blocksize = bh->b_size; > > bbits = block_size_bits(blocksize); > > > > - block = (sector_t)page->index << (PAGE_SHIFT - bbits); > > + block = (sector_t)folio->index << (PAGE_SHIFT - bbits); > > Shouldn't the PAGE_SHIFT be folio_shift(folio) as you allow larger > folios to be passed to this function in the later patches? No, the folio->index is expressed in multiples of PAGE_SIZE. > > last_block = (i_size_read(inode) - 1) >> bbits; > >