diff mbox series

[2/7] nfs: remove nfs_folio_private_request

Message ID 20240701052707.1246254-3-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/7] nfs: remove dead code for the old swap over NFS implementation | expand

Commit Message

Christoph Hellwig July 1, 2024, 5:26 a.m. UTC
nfs_folio_private_request is a trivial wrapper around, which itself has
fallen out of favor and has been replaced with plain ->private
dereferences in recent folio conversions.  Do the same for nfs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/nfs/write.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Sagi Grimberg July 2, 2024, 7:38 a.m. UTC | #1
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
diff mbox series

Patch

diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 641bdddeaad331..5410c18a006937 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -169,11 +169,6 @@  nfs_cancel_remove_inode(struct nfs_page *req, struct inode *inode)
 	return 0;
 }
 
-static struct nfs_page *nfs_folio_private_request(struct folio *folio)
-{
-	return folio_get_private(folio);
-}
-
 /**
  * nfs_folio_find_head_request - find head request associated with a folio
  * @folio: pointer to folio
@@ -190,7 +185,7 @@  static struct nfs_page *nfs_folio_find_head_request(struct folio *folio)
 	if (!folio_test_private(folio))
 		return NULL;
 	spin_lock(&mapping->i_private_lock);
-	req = nfs_folio_private_request(folio);
+	req = folio->private;
 	if (req) {
 		WARN_ON_ONCE(req->wb_head != req);
 		kref_get(&req->wb_kref);
@@ -220,7 +215,7 @@  static struct nfs_page *nfs_folio_find_and_lock_request(struct folio *folio)
 			return ERR_PTR(ret);
 		}
 		/* Ensure that nobody removed the request before we locked it */
-		if (head == nfs_folio_private_request(folio))
+		if (head == folio->private)
 			break;
 		nfs_unlock_and_release_request(head);
 	}