Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] nfsd: Remove incorrect check in nfsd4_validate_stateid
@ 2023-07-18 12:38 trondmy
  2023-07-18 13:35 ` Jeff Layton
  0 siblings, 1 reply; 7+ messages in thread
From: trondmy @ 2023-07-18 12:38 UTC (permalink / raw)
  To: Chuck Lever; +Cc: linux-nfs

From: Trond Myklebust <trond.myklebust@hammerspace.com>

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: 663e36f07666 ("nfsd4: kill warnings on testing stateids with mismatched clientids")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfsd/nfs4state.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 6e61fa3acaf1..3aefbad4cc09 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -6341,8 +6341,6 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)
 	if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) ||
 		CLOSE_STATEID(stateid))
 		return status;
-	if (!same_clid(&stateid->si_opaque.so_clid, &cl->cl_clientid))
-		return status;
 	spin_lock(&cl->cl_lock);
 	s = find_stateid_locked(cl, stateid);
 	if (!s)
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-18 18:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-18 12:38 [PATCH] nfsd: Remove incorrect check in nfsd4_validate_stateid trondmy
2023-07-18 13:35 ` Jeff Layton
2023-07-18 13:51   ` Trond Myklebust
2023-07-18 14:10     ` Jeff Layton
2023-07-18 14:12     ` Chuck Lever III
2023-07-18 14:30       ` Trond Myklebust
2023-07-18 18:15         ` Chuck Lever III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox