Thread (62 messages) 62 messages, 5 authors, 2021-07-30

Re: [PATCH v15 12/17] iomap: Convert iomap_page_mkwrite to use a folio

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-07-20 07:13:56
Also in: linux-fsdevel, linux-mm

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@lst.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help