mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-09 18:11:32 -04:00
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: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
@@ -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))
|
||||
return -EBUSY;
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user