aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-01-23 14:12:52 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-01-24 17:12:47 -0500
commitf4f58ed19b9ee303985f47352f795631a979294c (patch)
tree052baa5bbcd53ae10e578d37f68c6e547249adba /fs/nfs/callback_proc.c
parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
NFSv4.x: Remove hard coded slotids in callback channel
Instead, use the values encoded in the slot table itself. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r--fs/nfs/callback_proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index f0939d097406..83a66a8f40f2 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -361,7 +361,7 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
361 dprintk("%s enter. slotid %u seqid %u\n", 361 dprintk("%s enter. slotid %u seqid %u\n",
362 __func__, args->csa_slotid, args->csa_sequenceid); 362 __func__, args->csa_slotid, args->csa_sequenceid);
363 363
364 if (args->csa_slotid >= NFS41_BC_MAX_CALLBACKS) 364 if (args->csa_slotid > tbl->server_highest_slotid)
365 return htonl(NFS4ERR_BADSLOT); 365 return htonl(NFS4ERR_BADSLOT);
366 366
367 slot = tbl->slots + args->csa_slotid; 367 slot = tbl->slots + args->csa_slotid;
@@ -489,8 +489,8 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
489 sizeof(res->csr_sessionid)); 489 sizeof(res->csr_sessionid));
490 res->csr_sequenceid = args->csa_sequenceid; 490 res->csr_sequenceid = args->csa_sequenceid;
491 res->csr_slotid = args->csa_slotid; 491 res->csr_slotid = args->csa_slotid;
492 res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1; 492 res->csr_highestslotid = tbl->server_highest_slotid;
493 res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1; 493 res->csr_target_highestslotid = tbl->target_highest_slotid;
494 494
495 status = validate_seqid(tbl, args); 495 status = validate_seqid(tbl, args);
496 if (status) 496 if (status)