All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: linux-fsdevel@vger.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: [PATCH 02/26] iomap: Convert to release_folio
Date: Mon,  2 May 2022 06:55:50 +0100	[thread overview]
Message-ID: <20220502055614.3473032-3-willy@infradead.org> (raw)
In-Reply-To: <20220502055614.3473032-1-willy@infradead.org>

Change all the filesystems which used iomap_releasepage to use the
new function.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/gfs2/aops.c         |  2 +-
 fs/iomap/buffered-io.c | 22 ++++++++++------------
 fs/iomap/trace.h       |  2 +-
 fs/xfs/xfs_aops.c      |  2 +-
 fs/zonefs/super.c      |  2 +-
 include/linux/iomap.h  |  2 +-
 6 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 1016631bcbdc..3d6c5c5eb4f1 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -768,7 +768,7 @@ static const struct address_space_operations gfs2_aops = {
 	.read_folio = gfs2_read_folio,
 	.readahead = gfs2_readahead,
 	.dirty_folio = filemap_dirty_folio,
-	.releasepage = iomap_releasepage,
+	.release_folio = iomap_release_folio,
 	.invalidate_folio = iomap_invalidate_folio,
 	.bmap = gfs2_bmap,
 	.direct_IO = noop_direct_IO,
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 2de087ac87b6..8532f0e2e2d6 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -452,25 +452,23 @@ bool iomap_is_partially_uptodate(struct folio *folio, size_t from, size_t count)
 }
 EXPORT_SYMBOL_GPL(iomap_is_partially_uptodate);
 
-int
-iomap_releasepage(struct page *page, gfp_t gfp_mask)
+bool iomap_release_folio(struct folio *folio, gfp_t gfp_flags)
 {
-	struct folio *folio = page_folio(page);
-
-	trace_iomap_releasepage(folio->mapping->host, folio_pos(folio),
+	trace_iomap_release_folio(folio->mapping->host, folio_pos(folio),
 			folio_size(folio));
 
 	/*
-	 * mm accommodates an old ext3 case where clean pages might not have had
-	 * the dirty bit cleared. Thus, it can send actual dirty pages to
-	 * ->releasepage() via shrink_active_list(); skip those here.
+	 * mm accommodates an old ext3 case where clean folios might
+	 * not have had the dirty bit cleared.  Thus, it can send actual
+	 * dirty folios to ->release_folio() via shrink_active_list();
+	 * skip those here.
 	 */
 	if (folio_test_dirty(folio) || folio_test_writeback(folio))
-		return 0;
+		return false;
 	iomap_page_release(folio);
-	return 1;
+	return true;
 }
-EXPORT_SYMBOL_GPL(iomap_releasepage);
+EXPORT_SYMBOL_GPL(iomap_release_folio);
 
 void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len)
 {
@@ -1483,7 +1481,7 @@ iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)
 		 * Skip the page if it's fully outside i_size, e.g. due to a
 		 * truncate operation that's in progress. We must redirty the
 		 * page so that reclaim stops reclaiming it. Otherwise
-		 * iomap_vm_releasepage() is called on it and gets confused.
+		 * iomap_release_folio() is called on it and gets confused.
 		 *
 		 * Note that the end_index is unsigned long.  If the given
 		 * offset is greater than 16TB on a 32-bit system then if we
diff --git a/fs/iomap/trace.h b/fs/iomap/trace.h
index a6689a563c6e..d48868fc40d7 100644
--- a/fs/iomap/trace.h
+++ b/fs/iomap/trace.h
@@ -80,7 +80,7 @@ DEFINE_EVENT(iomap_range_class, name,	\
 	TP_PROTO(struct inode *inode, loff_t off, u64 len),\
 	TP_ARGS(inode, off, len))
 DEFINE_RANGE_EVENT(iomap_writepage);
-DEFINE_RANGE_EVENT(iomap_releasepage);
+DEFINE_RANGE_EVENT(iomap_release_folio);
 DEFINE_RANGE_EVENT(iomap_invalidate_folio);
 DEFINE_RANGE_EVENT(iomap_dio_invalidate_fail);
 
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index a9c4bb500d53..2acbfc6925dd 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -568,7 +568,7 @@ const struct address_space_operations xfs_address_space_operations = {
 	.readahead		= xfs_vm_readahead,
 	.writepages		= xfs_vm_writepages,
 	.dirty_folio		= filemap_dirty_folio,
-	.releasepage		= iomap_releasepage,
+	.release_folio		= iomap_release_folio,
 	.invalidate_folio	= iomap_invalidate_folio,
 	.bmap			= xfs_vm_bmap,
 	.direct_IO		= noop_direct_IO,
diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index c3a38f711b24..b1a428f860b3 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -197,7 +197,7 @@ static const struct address_space_operations zonefs_file_aops = {
 	.writepage		= zonefs_writepage,
 	.writepages		= zonefs_writepages,
 	.dirty_folio		= filemap_dirty_folio,
-	.releasepage		= iomap_releasepage,
+	.release_folio		= iomap_release_folio,
 	.invalidate_folio	= iomap_invalidate_folio,
 	.migratepage		= iomap_migrate_page,
 	.is_partially_uptodate	= iomap_is_partially_uptodate,
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 5b2aa45ddda3..0d674695b6d3 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -228,7 +228,7 @@ ssize_t iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *from,
 int iomap_read_folio(struct folio *folio, const struct iomap_ops *ops);
 void iomap_readahead(struct readahead_control *, const struct iomap_ops *ops);
 bool iomap_is_partially_uptodate(struct folio *, size_t from, size_t count);
-int iomap_releasepage(struct page *page, gfp_t gfp_mask);
+bool iomap_release_folio(struct folio *folio, gfp_t gfp_flags);
 void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len);
 #ifdef CONFIG_MIGRATION
 int iomap_migrate_page(struct address_space *mapping, struct page *newpage,
-- 
2.34.1


  parent reply	other threads:[~2022-05-02  5:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02  5:55 [PATCH 00/26] Converting release_page to release_folio Matthew Wilcox (Oracle)
2022-05-02  5:55 ` [PATCH 01/26] fs: Add aops->release_folio Matthew Wilcox (Oracle)
2022-05-02 15:19   ` Jeff Layton
2022-05-02 18:06     ` Matthew Wilcox
2022-05-02  5:55 ` Matthew Wilcox (Oracle) [this message]
2022-05-02  5:55 ` [PATCH 03/26] 9p: Convert to release_folio Matthew Wilcox (Oracle)
2022-05-02  5:55 ` [PATCH 04/26] afs: " Matthew Wilcox (Oracle)
2022-05-02  5:55 ` [PATCH 05/26] btrfs: " Matthew Wilcox (Oracle)
2022-05-02  5:55 ` [PATCH 06/26] ceph: " Matthew Wilcox (Oracle)
2022-05-02  5:55 ` [PATCH 07/26] cifs: " Matthew Wilcox (Oracle)
2022-05-02  5:55 ` [PATCH 08/26] erofs: " Matthew Wilcox (Oracle)
2022-05-02  5:55 ` [PATCH 09/26] ext4: " Matthew Wilcox (Oracle)
2022-05-02  5:55 ` [PATCH 10/26] f2fs: " Matthew Wilcox (Oracle)
2022-05-02  5:55 ` [PATCH 11/26] gfs2: " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 12/26] hfs: " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 13/26] hfsplus: " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 14/26] jfs: " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 15/26] nfs: " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 16/26] nilfs2: Remove comment about releasepage Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 17/26] ocfs2: Convert to release_folio Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 18/26] orangefs: " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 19/26] reiserfs: " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 20/26] ubifs: " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 21/26] fs: Remove last vestiges of releasepage Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 22/26] reiserfs: Convert release_buffer_page() to use a folio Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 23/26] jbd2: Convert jbd2_journal_try_to_free_buffers to take " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 24/26] jbd2: Convert release_buffer_page() to use " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 25/26] fs: Change try_to_free_buffers() to take " Matthew Wilcox (Oracle)
2022-05-02  5:56 ` [PATCH 26/26] fs: Convert drop_buffers() to use " Matthew Wilcox (Oracle)
2022-05-08 19:33 [GIT UPDATE] pagecache tree Matthew Wilcox
2022-05-08 20:32 ` [PATCH 00/26] Convert aops->releasepage to aops->release_folio Matthew Wilcox (Oracle)
2022-05-08 20:32   ` [PATCH 02/26] iomap: Convert to release_folio Matthew Wilcox (Oracle)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220502055614.3473032-3-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.