diff options
| author | Trond Myklebust <[email protected]> | 2025-06-24 21:32:09 +0000 |
|---|---|---|
| committer | Trond Myklebust <[email protected]> | 2025-07-14 22:20:27 +0000 |
| commit | 72508db0fe1762f2cfcff1cb4cf28a8e645bdd43 (patch) | |
| tree | 7a92ec2b2e67c8ea98241584c6ba71c0dc9c1f0f /fs/nfs/write.c | |
| parent | nfs: new tracepoint in match_stateid operation (diff) | |
| download | kernel-72508db0fe1762f2cfcff1cb4cf28a8e645bdd43.tar.gz kernel-72508db0fe1762f2cfcff1cb4cf28a8e645bdd43.zip | |
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 <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Diffstat (limited to 'fs/nfs/write.c')
| -rw-r--r-- | fs/nfs/write.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 374fc6b34c79..0dd22983f0d0 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -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) |
