Commit 72508db0 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: Allow folio migration for the case of mode == MIGRATE_SYNC



When the mode is MIGRATE_SYNC, we are allowed to call nfs_wb_folio()
under the folio lock.

Reviewed-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent b0b7cdc9
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2113,8 +2113,12 @@ int nfs_migrate_folio(struct address_space *mapping, struct folio *dst,
	 *        that we can safely release the inode reference while holding
	 *        the folio lock.
	 */
	if (folio_test_private(src)) {
		if (mode == MIGRATE_SYNC)
			nfs_wb_folio(src->mapping->host, src);
		if (folio_test_private(src))
			return -EBUSY;
	}

	if (folio_test_private_2(src)) { /* [DEPRECATED] */
		if (mode == MIGRATE_ASYNC)