summaryrefslogtreecommitdiff
path: root/fs/nfs/callback_proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-21 05:24:02 +0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-12-06 03:30:41 +0400
commitd5fb4ce33e26e4c1c31c1609b8ffbb24f80bcab8 (patch)
tree3b6335ba79258c540be8a21d1ffce412b6d95d52 /fs/nfs/callback_proc.c
parentce008c4bb9766bc7eeb02e8299c8baadc25da90b (diff)
downloadlinux-d5fb4ce33e26e4c1c31c1609b8ffbb24f80bcab8.tar.xz
NFSv4.1: Don't confuse target_highest_slotid and max_slots in cb_recall_slot
Don't confuse the table size and the target_highest_slotid... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r--fs/nfs/callback_proc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 15b9879d6fbb..ed0b446e2e38 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -561,22 +561,20 @@ __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy,
if (!cps->clp) /* set in cb_sequence */
goto out;
- dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target max slots %d\n",
+ dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target highest slotid %d\n",
rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR),
- args->crsa_target_max_slots);
+ args->crsa_target_highest_slotid);
fc_tbl = &cps->clp->cl_session->fc_slot_table;
status = htonl(NFS4ERR_BAD_HIGH_SLOT);
- if (args->crsa_target_max_slots > fc_tbl->max_slots ||
- args->crsa_target_max_slots < 1)
+ if (args->crsa_target_highest_slotid >= fc_tbl->max_slots ||
+ args->crsa_target_highest_slotid < 1)
goto out;
status = htonl(NFS4_OK);
- if (args->crsa_target_max_slots == fc_tbl->max_slots)
- goto out;
- nfs41_set_target_slotid(fc_tbl, args->crsa_target_max_slots);
+ nfs41_set_target_slotid(fc_tbl, args->crsa_target_highest_slotid);
nfs41_handle_recall_slot(cps->clp);
out:
dprintk("%s: exit with status = %d\n", __func__, ntohl(status));