diff mbox series

[RFC,5/7] NFS: direct-io: convert to FOLL_PIN pages

Message ID 20220225085025.3052894-6-jhubbard@nvidia.com (mailing list archive)
State New
Headers show
Series block, fs: convert Direct IO to FOLL_PIN | expand

Commit Message

John Hubbard Feb. 25, 2022, 8:50 a.m. UTC
Now that Direct IO's core allocators invoke pin_user_pages_fast(), those
pages must free released via unpin_user_page(), instead of put_page().

Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 fs/nfs/direct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index eabfdab543c8..2e0d399c5a5a 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -181,7 +181,7 @@  static void nfs_direct_release_pages(struct page **pages, unsigned int npages)
 {
 	unsigned int i;
 	for (i = 0; i < npages; i++)
-		put_page(pages[i]);
+		dio_w_unpin_user_page(pages[i]);
 }
 
 void nfs_init_cinfo_from_dreq(struct nfs_commit_info *cinfo,