]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
nfsd: simplify process_lock
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 21 Jan 2021 22:57:38 +0000 (17:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2024 12:52:56 +0000 (14:52 +0200)
[ Upstream commit a9d53a75cf574d6aa41f3cb4968fffe4f64e0fad ]

Similarly, this STALE_CLIENTID check is already handled by:

nfs4_preprocess_confirmed_seqid_op()->
        nfs4_preprocess_seqid_op()->
                nfsd4_lookup_stateid()->
                        set_client()->
                                STALE_CLIENTID()

(This may cause it to return a different error in some cases where
there are multiple things wrong; pynfs test SEQ10 regressed on this
commit because of that, but I think that's the test's fault, and I've
fixed it separately.)

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4state.c

index 3f2604737636819ef8b44a58e005af8d187ef1c3..15ed72b0ef55b10c49d8445c35dd77d5d1b385d2 100644 (file)
@@ -6720,10 +6720,6 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
                                &cstate->session->se_client->cl_clientid,
                                sizeof(clientid_t));
 
-               status = nfserr_stale_clientid;
-               if (STALE_CLIENTID(&lock->lk_new_clientid, nn))
-                       goto out;
-
                /* validate and update open stateid and open seqid */
                status = nfs4_preprocess_confirmed_seqid_op(cstate,
                                        lock->lk_new_open_seqid,