From: Christoph Hellwig <hch@lst.de>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: Chris Mason <clm@meta.com>, linux-nfs@vger.kernel.org
Subject: [PATCH 1/7] NFS: return void from nfs4_inode_make_writeable
Date: Wed, 28 Jan 2026 05:46:03 +0100 [thread overview]
Message-ID: <20260128044706.556046-2-hch@lst.de> (raw)
In-Reply-To: <20260128044706.556046-1-hch@lst.de>
None of the callers checks the return value, so drop it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/nfs/delegation.c | 10 +++-------
fs/nfs/delegation.h | 2 +-
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 4d5f1f3162b0..c77c7b2d5877 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -912,23 +912,19 @@ void nfs4_inode_return_delegation_on_close(struct inode *inode)
* @inode: pointer to inode
*
* Make the inode writeable by returning the delegation if necessary
- *
- * Returns zero on success, or a negative errno value.
*/
-int nfs4_inode_make_writeable(struct inode *inode)
+void nfs4_inode_make_writeable(struct inode *inode)
{
struct nfs_delegation *delegation;
- int error = 0;
delegation = nfs4_get_valid_delegation(inode);
if (!delegation)
- return 0;
+ return;
if (!nfs4_has_session(NFS_SERVER(inode)->nfs_client) ||
!(delegation->type & FMODE_WRITE))
- error = nfs4_inode_return_delegation(inode);
+ nfs4_inode_return_delegation(inode);
nfs_put_delegation(delegation);
- return error;
}
static void
diff --git a/fs/nfs/delegation.h b/fs/nfs/delegation.h
index a6733f034442..d30f19a28077 100644
--- a/fs/nfs/delegation.h
+++ b/fs/nfs/delegation.h
@@ -87,7 +87,7 @@ int nfs4_check_delegation(struct inode *inode, fmode_t type);
bool nfs4_delegation_flush_on_close(const struct inode *inode);
void nfs_inode_find_delegation_state_and_recover(struct inode *inode,
const nfs4_stateid *stateid);
-int nfs4_inode_make_writeable(struct inode *inode);
+void nfs4_inode_make_writeable(struct inode *inode);
#endif
--
2.47.3
next prev parent reply other threads:[~2026-01-28 4:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 4:46 delayed delegation return handling fix Christoph Hellwig
2026-01-28 4:46 ` Christoph Hellwig [this message]
2026-01-28 4:46 ` [PATCH 2/7] NFS: return void from ->return_delegation Christoph Hellwig
2026-01-28 4:46 ` [PATCH 3/7] NFS: use bool for the issync argument to nfs_end_delegation_return Christoph Hellwig
2026-01-28 4:46 ` [PATCH 4/7] NFS: remove the delegation == NULL check in nfs_end_delegation_return Christoph Hellwig
2026-01-28 4:46 ` [PATCH 5/7] NFS: fold nfs_abort_delegation_return into nfs_end_delegation_return Christoph Hellwig
2026-01-28 4:46 ` [PATCH 6/7] NFS: simplify error handling in nfs_end_delegation_return Christoph Hellwig
2026-01-28 4:46 ` [PATCH 7/7] NFS: fix delayed delegation return handling Christoph Hellwig
2026-01-28 19:15 ` delayed delegation return handling fix Chris Mason
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=20260128044706.556046-2-hch@lst.de \
--to=hch@lst.de \
--cc=anna@kernel.org \
--cc=clm@meta.com \
--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