On Mon, Jul 19, 2021 at 07:39:56PM +0100, Matthew Wilcox (Oracle) wrote: > - struct page *page = data; > + struct folio *folio = data; > int ret; > > if (iomap->flags & IOMAP_F_BUFFER_HEAD) { > - ret = __block_write_begin_int(page, pos, length, NULL, iomap); > + ret = __block_write_begin_int(&folio->page, pos, length, NULL, > + iomap); > if (ret) > return ret; > - block_commit_write(page, 0, length); > + block_commit_write(&folio->page, 0, length); > } else { > - WARN_ON_ONCE(!PageUptodate(page)); > - set_page_dirty(page); > + WARN_ON_ONCE(!folio_test_uptodate(folio)); > + folio_mark_dirty(folio); Not that having this else clause code for the !IOMAP_F_BUFFER_HEAD case here is a bit silly, and becomes more so with folios - it should probably move into the caller. I'll see what I can do there in this merge window to prepare. Otherwise this looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>