]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
NFS: return void from nfs4_inode_make_writeable
authorChristoph Hellwig <hch@lst.de>
Wed, 28 Jan 2026 04:46:03 +0000 (05:46 +0100)
committerAnna Schumaker <anna.schumaker@oracle.com>
Fri, 30 Jan 2026 21:49:15 +0000 (16:49 -0500)
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>
fs/nfs/delegation.c
fs/nfs/delegation.h

index 4d5f1f3162b08514786552a4e5948b63eb297946..c77c7b2d5877484fb34be45f057a4fc5803346a4 100644 (file)
@@ -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
index a6733f034442ba2234e4c42e2f428e723d383272..d30f19a280775077bd118ce4e424ebb9dc06f4bc 100644 (file)
@@ -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