]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/nfs4state.c
nfsd4: fix bad seqid on lock request incompatible with open mode
[linux-2.6-omap-h63xx.git] / fs / nfsd / nfs4state.c
index 11aa4b6b4fa26918da5f9aa945daee8a0300ca47..c4b10a1e6c30c4e94ac8e080ae4357848b4aa771 100644 (file)
@@ -2093,8 +2093,10 @@ nfs4_preprocess_seqid_op(struct svc_fh *current_fh, u32 seqid, stateid_t *statei
                goto check_replay;
        }
 
+       *stpp = stp;
+       *sopp = sop = stp->st_stateowner;
+
        if (lock) {
-               struct nfs4_stateowner *sop = stp->st_stateowner;
                clientid_t *lockclid = &lock->v.new.clientid;
                struct nfs4_client *clp = sop->so_client;
                int lkflg = 0;
@@ -2124,9 +2126,6 @@ nfs4_preprocess_seqid_op(struct svc_fh *current_fh, u32 seqid, stateid_t *statei
                return nfserr_bad_stateid;
        }
 
-       *stpp = stp;
-       *sopp = sop = stp->st_stateowner;
-
        /*
        *  We now validate the seqid and stateid generation numbers.
        *  For the moment, we ignore the possibility of