nfsd: simplify process_lock
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 21 Jan 2021 22:57:38 +0000 (17:57 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 25 Jan 2021 14:36:29 +0000 (09:36 -0500)
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>
fs/nfsd/nfs4state.c

index f9f89229dba6d7b2e4bcc5b896c1afa1c863d76a..7ea63d7cec4deea96c64713d065837d460f54e53 100644 (file)
@@ -6697,10 +6697,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,