forked from Minki/linux
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>
This commit is contained in:
parent
5e4146558c
commit
eef15ea146
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user