diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-04-30 23:05:09 -0400 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-09 23:12:32 -0400 |
commit | a26d3411bbdd5124d6c63272f279a509e903553b (patch) | |
tree | b4fb12cfa6ff9b711f942a79bf51e947a9d6e751 /fs/9p | |
parent | 8597447dc565a6a3fa7bc503674452b7ae2b914c (diff) | |
download | linux-rpi-a26d3411bbdd5124d6c63272f279a509e903553b.tar.gz linux-rpi-a26d3411bbdd5124d6c63272f279a509e903553b.tar.bz2 linux-rpi-a26d3411bbdd5124d6c63272f279a509e903553b.zip |
9p: Convert to release_folio
A straightforward conversion as it already works in terms of folios.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/vfs_addr.c | 17 |
1 files 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, |