]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
NFS: remove the NULL inode check in nfs4_inode_return_delegation_on_close
authorChristoph Hellwig <hch@lst.de>
Wed, 7 Jan 2026 07:26:55 +0000 (08:26 +0100)
committerAnna Schumaker <anna.schumaker@oracle.com>
Tue, 20 Jan 2026 19:49:45 +0000 (14:49 -0500)
The only caller dereferences a field in the inode just before calling
nfs4_inode_return_delegation_on_close.

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

index 95f410d65e3ccbc98f918738fc89e4246f179ca2..937d5d9f933f3672123a390986e9b505a5bc8f24 100644 (file)
@@ -860,8 +860,6 @@ void nfs4_inode_return_delegation_on_close(struct inode *inode)
        struct nfs_delegation *delegation;
        struct nfs_delegation *ret = NULL;
 
-       if (!inode)
-               return;
        rcu_read_lock();
        delegation = nfs4_get_valid_delegation(inode);
        if (!delegation)