From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: linux-fsdevel@vger.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: [PATCH 03/26] 9p: Convert to release_folio
Date: Mon, 2 May 2022 06:55:51 +0100 [thread overview]
Message-ID: <20220502055614.3473032-4-willy@infradead.org> (raw)
In-Reply-To: <20220502055614.3473032-1-willy@infradead.org>
A straightforward conversion as it already works in terms of folios.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
fs/9p/vfs_addr.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index 3a84167f4893..8ce82ff1e40a 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -100,29 +100,28 @@ const struct netfs_request_ops v9fs_req_ops = {
};
/**
- * v9fs_release_page - release the private state associated with a page
- * @page: The page to be released
+ * v9fs_release_folio - release the private state associated with a folio
+ * @folio: The folio to be released
* @gfp: The caller's allocation restrictions
*
- * Returns 1 if the page can be released, false otherwise.
+ * Returns true if the page can be released, false otherwise.
*/
-static int v9fs_release_page(struct page *page, gfp_t gfp)
+static bool v9fs_release_folio(struct folio *folio, gfp_t gfp)
{
- struct folio *folio = page_folio(page);
struct inode *inode = folio_inode(folio);
if (folio_test_private(folio))
- return 0;
+ return false;
#ifdef CONFIG_9P_FSCACHE
if (folio_test_fscache(folio)) {
if (current_is_kswapd() || !(gfp & __GFP_FS))
- return 0;
+ return false;
folio_wait_fscache(folio);
}
#endif
fscache_note_page_release(v9fs_inode_cookie(V9FS_I(inode)));
- return 1;
+ return true;
}
static void v9fs_invalidate_folio(struct folio *folio, size_t offset,
@@ -342,7 +341,7 @@ const struct address_space_operations v9fs_addr_operations = {
.writepage = v9fs_vfs_writepage,
.write_begin = v9fs_write_begin,
.write_end = v9fs_write_end,
- .releasepage = v9fs_release_page,
+ .release_folio = v9fs_release_folio,
.invalidate_folio = v9fs_invalidate_folio,
.launder_folio = v9fs_launder_folio,
.direct_IO = v9fs_direct_IO,
--
2.34.1
next prev 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 ` [PATCH 02/26] iomap: Convert to release_folio Matthew Wilcox (Oracle)
2022-05-02 5:55 ` Matthew Wilcox (Oracle) [this message]
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)
-- strict thread matches above, loose matches on Subject: below --
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 03/26] 9p: 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-4-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).