diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-01 06:26:14 +0300 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-10 06:12:32 +0300 |
commit | eef15ea146f82a06487c4b1d6a545a97b0401cd3 (patch) | |
tree | cbb8dc1f2005f269882f151700bf6fef02358ad2 /fs | |
parent | 5e4146558c96f4935b803f2c4243f3c3f29c4476 (diff) | |
download | linux-eef15ea146f82a06487c4b1d6a545a97b0401cd3.tar.xz |
cifs: Convert to release_folio
Use a folio throughout cifs_release_folio().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/file.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index bc6d88e2e672..06003bb9cbe9 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -4758,16 +4758,16 @@ out: return rc; } -static int cifs_release_page(struct page *page, gfp_t gfp) +static bool cifs_release_folio(struct folio *folio, gfp_t gfp) { - if (PagePrivate(page)) + if (folio_test_private(folio)) return 0; - if (PageFsCache(page)) { + if (folio_test_fscache(folio)) { if (current_is_kswapd() || !(gfp & __GFP_FS)) return false; - wait_on_page_fscache(page); + folio_wait_fscache(folio); } - fscache_note_page_release(cifs_inode_cookie(page->mapping->host)); + fscache_note_page_release(cifs_inode_cookie(folio->mapping->host)); return true; } @@ -4973,7 +4973,7 @@ const struct address_space_operations cifs_addr_ops = { .write_begin = cifs_write_begin, .write_end = cifs_write_end, .dirty_folio = cifs_dirty_folio, - .releasepage = cifs_release_page, + .release_folio = cifs_release_folio, .direct_IO = cifs_direct_io, .invalidate_folio = cifs_invalidate_folio, .launder_folio = cifs_launder_folio, @@ -4998,7 +4998,7 @@ const struct address_space_operations cifs_addr_ops_smallbuf = { .write_begin = cifs_write_begin, .write_end = cifs_write_end, .dirty_folio = cifs_dirty_folio, - .releasepage = cifs_release_page, + .release_folio = cifs_release_folio, .invalidate_folio = cifs_invalidate_folio, .launder_folio = cifs_launder_folio, }; |