]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd: Remove incorrect check in nfsd4_validate_stateid
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 18 Jul 2023 12:38:37 +0000 (08:38 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:22:44 +0000 (10:22 +0200)
commit8130c32b4ac124df268db71f649cfbf3d046db1e
tree049c4b93787b7c437b0d925082540ef6c2baf821
parent9b8a31a2315202694339192b7a4d47e5df44a8f2
nfsd: Remove incorrect check in nfsd4_validate_stateid

commit f75546f58a70da5cfdcec5a45ffc377885ccbee8 upstream.

If the client is calling TEST_STATEID, then it is because some event
occurred that requires it to check all the stateids for validity and
call FREE_STATEID on the ones that have been revoked. In this case,
either the stateid exists in the list of stateids associated with that
nfs4_client, in which case it should be tested, or it does not. There
are no additional conditions to be considered.

Reported-by: "Frank Ch. Eigler" <fche@redhat.com>
Fixes: 7df302f75ee2 ("NFSD: TEST_STATEID should not return NFS4ERR_STALE_STATEID")
Cc: stable@vger.kernel.org # v5.7+
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4state.c