[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]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux