]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
NFS: remove nfs_start_delegation_return
authorChristoph Hellwig <hch@lst.de>
Wed, 7 Jan 2026 07:26:57 +0000 (08:26 +0100)
committerAnna Schumaker <anna.schumaker@oracle.com>
Tue, 20 Jan 2026 19:49:46 +0000 (14:49 -0500)
There is only one caller, so fold it into that.  With that,
nfs_start_delegation_return

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/delegation.c

index 86b8da1e259891b40fb56dfe878513b1e54ad7db..1f899edd427f14fb8e54aba1f41562615eb5be6f 100644 (file)
@@ -336,17 +336,6 @@ out:
        return ret;
 }
 
-static struct nfs_delegation *
-nfs_start_delegation_return(struct nfs_inode *nfsi)
-{
-       struct nfs_delegation *delegation;
-
-       rcu_read_lock();
-       delegation = nfs_start_delegation_return_locked(nfsi);
-       rcu_read_unlock();
-       return delegation;
-}
-
 static void nfs_abort_delegation_return(struct nfs_delegation *delegation,
                                        struct nfs_server *server, int err)
 {
@@ -793,15 +782,18 @@ int nfs4_inode_return_delegation(struct inode *inode)
        struct nfs_inode *nfsi = NFS_I(inode);
        struct nfs_delegation *delegation;
 
-       delegation = nfs_start_delegation_return(nfsi);
-       if (delegation != NULL) {
-               /* Synchronous recall of any application leases */
-               break_lease(inode, O_WRONLY | O_RDWR);
-               if (S_ISREG(inode->i_mode))
-                       nfs_wb_all(inode);
-               return nfs_end_delegation_return(inode, delegation, 1);
-       }
-       return 0;
+       rcu_read_lock();
+       delegation = nfs_start_delegation_return_locked(nfsi);
+       rcu_read_unlock();
+
+       if (!delegation)
+               return 0;
+
+       /* Synchronous recall of any application leases */
+       break_lease(inode, O_WRONLY | O_RDWR);
+       if (S_ISREG(inode->i_mode))
+               nfs_wb_all(inode);
+       return nfs_end_delegation_return(inode, delegation, 1);
 }
 
 /**