diff mbox series

[22/31] ext4: Convert ext4_page_nomap_can_writeout() to take a folio

Message ID 20230126202415.1682629-23-willy@infradead.org
State Changes Requested
Headers show
Series Convert most of ext4 to folios | expand

Commit Message

Matthew Wilcox Jan. 26, 2023, 8:24 p.m. UTC
Its one caller is already using a folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/ext4/inode.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Theodore Ts'o March 14, 2023, 10:50 p.m. UTC | #1
On Thu, Jan 26, 2023 at 08:24:06PM +0000, Matthew Wilcox (Oracle) wrote:
> Its one caller is already using a folio.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
diff mbox series

Patch

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 9b2c21d0e1f3..e7e8f2946012 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2563,11 +2563,11 @@  static int ext4_da_writepages_trans_blocks(struct inode *inode)
 }
 
 /* Return true if the page needs to be written as part of transaction commit */
-static bool ext4_page_nomap_can_writeout(struct page *page)
+static bool ext4_page_nomap_can_writeout(struct folio *folio)
 {
 	struct buffer_head *bh, *head;
 
-	bh = head = page_buffers(page);
+	bh = head = folio_buffers(folio);
 	do {
 		if (buffer_dirty(bh) && buffer_mapped(bh) && !buffer_delay(bh))
 			return true;
@@ -2683,7 +2683,7 @@  static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd)
 			 * modify metadata is simple. Just submit the page.
 			 */
 			if (!mpd->can_map) {
-				if (ext4_page_nomap_can_writeout(&folio->page)) {
+				if (ext4_page_nomap_can_writeout(folio)) {
 					err = mpage_submit_folio(mpd, folio);
 					if (err < 0)
 						goto out;