From: Christoph Hellwig <hch@lst.de>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 2/7] nfs: remove nfs_folio_private_request
Date: Mon, 1 Jul 2024 07:26:49 +0200 [thread overview]
Message-ID: <20240701052707.1246254-3-hch@lst.de> (raw)
In-Reply-To: <20240701052707.1246254-1-hch@lst.de>
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(-)
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);
}
--
2.43.0
next prev parent reply other threads:[~2024-07-01 5:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 5:26 NFS buffered write cleanup Christoph Hellwig
2024-07-01 5:26 ` [PATCH 1/7] nfs: remove dead code for the old swap over NFS implementation Christoph Hellwig
2024-07-02 7:37 ` Sagi Grimberg
2024-07-01 5:26 ` Christoph Hellwig [this message]
2024-07-02 7:38 ` [PATCH 2/7] nfs: remove nfs_folio_private_request Sagi Grimberg
2024-07-01 5:26 ` [PATCH 3/7] nfs: simplify nfs_folio_find_and_lock_request Christoph Hellwig
2024-07-02 7:54 ` Sagi Grimberg
2024-07-03 4:19 ` Christoph Hellwig
2024-07-01 5:26 ` [PATCH 4/7] nfs: fold nfs_folio_find_and_lock_request into nfs_lock_and_join_requests Christoph Hellwig
2024-07-02 7:57 ` Sagi Grimberg
2024-07-03 4:20 ` Christoph Hellwig
2024-07-01 5:26 ` [PATCH 5/7] nfs: fold nfs_page_group_lock_subrequests " Christoph Hellwig
2024-07-02 7:59 ` Sagi Grimberg
2024-07-01 5:26 ` [PATCH 6/7] nfs: move nfs_wait_on_request to write.c Christoph Hellwig
2024-07-02 7:59 ` Sagi Grimberg
2024-07-01 5:26 ` [PATCH 7/7] nfs: don't reuse partially completed requests in nfs_lock_and_join_requests Christoph Hellwig
2024-07-02 8:07 ` Sagi Grimberg
2024-07-03 4:25 ` Christoph Hellwig
2024-07-05 5:35 ` NFS buffered write cleanup Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240701052707.1246254-3-hch@lst.de \
--to=hch@lst.de \
--cc=anna@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox