[PATCH 26/31] ext4: Convert ext4_writepage() to take a folio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Its one caller already has a folio.  Saves a call to compound_head().

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

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 507c7f88d737..9bcf7459a0c0 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2015,10 +2015,9 @@ static int __ext4_journalled_writepage(struct folio *folio,
  * But since we don't do any block allocation we should not deadlock.
  * Page also have the dirty flag cleared so we don't get recurive page_lock.
  */
-static int ext4_writepage(struct page *page,
+static int ext4_writepage(struct folio *folio,
 			  struct writeback_control *wbc)
 {
-	struct folio *folio = page_folio(page);
 	int ret = 0;
 	loff_t size;
 	size_t len;
@@ -2032,7 +2031,7 @@ static int ext4_writepage(struct page *page,
 		return -EIO;
 	}
 
-	trace_ext4_writepage(page);
+	trace_ext4_writepage(&folio->page);
 	size = i_size_read(inode);
 	len = folio_size(folio);
 	if (folio_pos(folio) + len > size &&
@@ -2719,7 +2718,7 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd)
 static int ext4_writepage_cb(struct folio *folio, struct writeback_control *wbc,
 			     void *data)
 {
-	return ext4_writepage(&folio->page, wbc);
+	return ext4_writepage(folio, wbc);
 }
 
 static int ext4_do_writepages(struct mpage_da_data *mpd)
-- 
2.35.1




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux