summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-02-09 20:21:55 +0000
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-15 08:23:30 -0400
commitff2b48b96599b46edbcef1281502ef46edcb24c4 (patch)
tree23db02c7b4b2ee18d0e438196bf40cd5a426caf2 /fs/cifs
parenta42442dd73694114705a5e1a429d38457774d904 (diff)
cifs: Convert from launder_page to launder_folio
Straightforward conversion. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Tested-by: Mike Marshall <hubcap@omnibond.com> # orangefs Tested-by: David Howells <dhowells@redhat.com> # afs
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/file.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 076094e79170..3fe3c5552b39 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -4760,11 +4760,11 @@ static void cifs_invalidate_folio(struct folio *folio, size_t offset,
folio_wait_fscache(folio);
}
-static int cifs_launder_page(struct page *page)
+static int cifs_launder_folio(struct folio *folio)
{
int rc = 0;
- loff_t range_start = page_offset(page);
- loff_t range_end = range_start + (loff_t)(PAGE_SIZE - 1);
+ loff_t range_start = folio_pos(folio);
+ loff_t range_end = range_start + folio_size(folio);
struct writeback_control wbc = {
.sync_mode = WB_SYNC_ALL,
.nr_to_write = 0,
@@ -4772,12 +4772,12 @@ static int cifs_launder_page(struct page *page)
.range_end = range_end,
};
- cifs_dbg(FYI, "Launder page: %p\n", page);
+ cifs_dbg(FYI, "Launder page: %lu\n", folio->index);
- if (clear_page_dirty_for_io(page))
- rc = cifs_writepage_locked(page, &wbc);
+ if (folio_clear_dirty_for_io(folio))
+ rc = cifs_writepage_locked(&folio->page, &wbc);
- wait_on_page_fscache(page);
+ folio_wait_fscache(folio);
return rc;
}
@@ -4958,7 +4958,7 @@ const struct address_space_operations cifs_addr_ops = {
.releasepage = cifs_release_page,
.direct_IO = cifs_direct_io,
.invalidate_folio = cifs_invalidate_folio,
- .launder_page = cifs_launder_page,
+ .launder_folio = cifs_launder_folio,
/*
* TODO: investigate and if useful we could add an cifs_migratePage
* helper (under an CONFIG_MIGRATION) in the future, and also
@@ -4982,5 +4982,5 @@ const struct address_space_operations cifs_addr_ops_smallbuf = {
.set_page_dirty = cifs_set_page_dirty,
.releasepage = cifs_release_page,
.invalidate_folio = cifs_invalidate_folio,
- .launder_page = cifs_launder_page,
+ .launder_folio = cifs_launder_folio,
};