]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NFSv4.x: CB_SEQUENCE should return NFS4ERR_DELAY if still executing
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sat, 23 Jan 2016 22:15:37 +0000 (17:15 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 24 Jan 2016 22:12:48 +0000 (17:12 -0500)
See RFC5661 Section 2.10.6.2: if retrying a request, and the old one is
still in progress, we must return NFS4ERR_DELAY as the reply to sequence.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/callback_proc.c

index 83a66a8f40f2c5abeff7f40e0e0530c412635543..e0844fdbd9ac4a99d4616838bf1d38557311abcf 100644 (file)
@@ -375,6 +375,8 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
        if (args->csa_sequenceid == slot->seq_nr) {
                dprintk("%s seqid %u is a replay\n",
                        __func__, args->csa_sequenceid);
+               if (tbl->highest_used_slotid != NFS4_NO_SLOT)
+                       return htonl(NFS4ERR_DELAY);
                /* Signal process_op to set this error on next op */
                if (args->csa_cachethis == 0)
                        return htonl(NFS4ERR_RETRY_UNCACHED_REP);