summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2026-01-28 05:46:03 +0100
committerAnna Schumaker <anna.schumaker@oracle.com>2026-01-30 16:49:15 -0500
commitd37272c62a08b5fc74bedf7b560f794a84b7cdf1 (patch)
tree07191ab57ed765cbd6fa141309934abc6a360b26
parent7537db24806fdc3d3ec4fef53babdc22c9219e75 (diff)
NFS: return void from nfs4_inode_make_writeable
None of the callers checks the return value, so drop it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
-rw-r--r--fs/nfs/delegation.c10
-rw-r--r--fs/nfs/delegation.h2
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