summaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_proc.c
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2015-06-02 18:59:01 +0800
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-06-11 21:09:06 -0400
commit0579c8d2084adf932f09fe7edb5ee9328795d89f (patch)
treee9256b3aed887465d086393d620f5e150fc8847f /fs/nfs/callback_proc.c
parente937ee714b2df638275a61a99e0d033682f764d2 (diff)
downloadop-kernel-dev-0579c8d2084adf932f09fe7edb5ee9328795d89f.zip
op-kernel-dev-0579c8d2084adf932f09fe7edb5ee9328795d89f.tar.gz
nfs: Initialize cb_sequenceres information before validate_seqid()
For a cb_layoutrecall replay, nfsd got CB_SEQUENCE status of zero, but all informations of cb_sequenceres are zero too !!! validate_seqid() return NFS4ERR_RETRY_UNCACHED_REP for a replay, and skip the initlize cb_sequenceres. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r--fs/nfs/callback_proc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 7e9653a..17a5c57 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -445,6 +445,13 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
goto out;
}
+ memcpy(&res->csr_sessionid, &args->csa_sessionid,
+ sizeof(res->csr_sessionid));
+ res->csr_sequenceid = args->csa_sequenceid;
+ res->csr_slotid = args->csa_slotid;
+ res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
+ res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
+
status = validate_seqid(tbl, args);
spin_unlock(&tbl->slot_tbl_lock);
if (status)
@@ -462,13 +469,6 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
goto out;
}
- memcpy(&res->csr_sessionid, &args->csa_sessionid,
- sizeof(res->csr_sessionid));
- res->csr_sequenceid = args->csa_sequenceid;
- res->csr_slotid = args->csa_slotid;
- res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
- res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
-
/*
* RFC5661 20.9.3
* If CB_SEQUENCE returns an error, then the state of the slot
OpenPOWER on IntegriCloud