Skip to content

Commit f75546f

Browse files
Trond Myklebustchucklever
authored andcommitted
nfsd: Remove incorrect check in nfsd4_validate_stateid
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: 7df302f ("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>
1 parent d7dbed4 commit f75546f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/nfsd/nfs4state.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6341,8 +6341,6 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)
63416341
if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) ||
63426342
CLOSE_STATEID(stateid))
63436343
return status;
6344-
if (!same_clid(&stateid->si_opaque.so_clid, &cl->cl_clientid))
6345-
return status;
63466344
spin_lock(&cl->cl_lock);
63476345
s = find_stateid_locked(cl, stateid);
63486346
if (!s)

0 commit comments

Comments
 (0)