diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-06-06 15:22:19 +0200 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-08-02 18:34:03 +0200 |
commit | 4ae84a80475144f739f77ed8bc789bc7feaa08ce (patch) | |
tree | 14b28d3104a882de6641c0b625dbadbbdc9c8e7b /fs/nfs/write.c | |
parent | btrfs: Convert btree_migratepage to migrate_folio (diff) | |
download | linux-4ae84a80475144f739f77ed8bc789bc7feaa08ce.tar.xz linux-4ae84a80475144f739f77ed8bc789bc7feaa08ce.zip |
nfs: Convert to migrate_folio
Use a folio throughout this function. migrate_page() will be converted
later.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to '')
-rw-r--r-- | fs/nfs/write.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 1c706465d090..649b9e633459 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -2119,27 +2119,27 @@ out_error: } #ifdef CONFIG_MIGRATION -int nfs_migrate_page(struct address_space *mapping, struct page *newpage, - struct page *page, enum migrate_mode mode) +int nfs_migrate_folio(struct address_space *mapping, struct folio *dst, + struct folio *src, enum migrate_mode mode) { /* - * If PagePrivate is set, then the page is currently associated with + * If the private flag is set, the folio is currently associated with * an in-progress read or write request. Don't try to migrate it. * * FIXME: we could do this in principle, but we'll need a way to ensure * that we can safely release the inode reference while holding - * the page lock. + * the folio lock. */ - if (PagePrivate(page)) + if (folio_test_private(src)) return -EBUSY; - if (PageFsCache(page)) { + if (folio_test_fscache(src)) { if (mode == MIGRATE_ASYNC) return -EBUSY; - wait_on_page_fscache(page); + folio_wait_fscache(src); } - return migrate_page(mapping, newpage, page, mode); + return migrate_page(mapping, &dst->page, &src->page, mode); } #endif |