Commit f75546f5 authored by Trond Myklebust's avatar Trond Myklebust Committed by Chuck Lever

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: default avatar"Frank Ch. Eigler" <fche@redhat.com>
Fixes: 7df302f7 ("NFSD: TEST_STATEID should not return NFS4ERR_STALE_STATEID")
Cc: stable@vger.kernel.org # v5.7+
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent d7dbed45
...@@ -6341,8 +6341,6 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid) ...@@ -6341,8 +6341,6 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)
if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) || if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) ||
CLOSE_STATEID(stateid)) CLOSE_STATEID(stateid))
return status; return status;
if (!same_clid(&stateid->si_opaque.so_clid, &cl->cl_clientid))
return status;
spin_lock(&cl->cl_lock); spin_lock(&cl->cl_lock);
s = find_stateid_locked(cl, stateid); s = find_stateid_locked(cl, stateid);
if (!s) if (!s)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment