aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_proc.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2010-01-21 14:19:16 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-02-10 08:31:00 -0500
commitbae0ac0ee1839e345a9b26d8c00eb3ef565caad1 (patch)
treea4532f4b27afe2dfc83b0b839adc39bd19efdce9 /fs/nfs/callback_proc.c
parent104aeba484c9291cde2def6d037b836af46d8eb0 (diff)
nfs41: fix nfs4_callback_recallslot
Return NFS4_OK if target high slotid equals enforced high slotid. Fix nfs_client reference leak. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r--fs/nfs/callback_proc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index e5155d9df595..c79e18cd0e15 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -381,13 +381,17 @@ unsigned nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy)
381 fc_tbl = &clp->cl_session->fc_slot_table; 381 fc_tbl = &clp->cl_session->fc_slot_table;
382 382
383 status = htonl(NFS4ERR_BAD_HIGH_SLOT); 383 status = htonl(NFS4ERR_BAD_HIGH_SLOT);
384 if (args->crsa_target_max_slots >= fc_tbl->max_slots || 384 if (args->crsa_target_max_slots > fc_tbl->max_slots ||
385 args->crsa_target_max_slots < 1) 385 args->crsa_target_max_slots < 1)
386 goto out; 386 goto out_putclient;
387
388 status = htonl(NFS4_OK);
389 if (args->crsa_target_max_slots == fc_tbl->max_slots)
390 goto out_putclient;
387 391
388 fc_tbl->target_max_slots = args->crsa_target_max_slots; 392 fc_tbl->target_max_slots = args->crsa_target_max_slots;
389 nfs41_handle_recall_slot(clp); 393 nfs41_handle_recall_slot(clp);
390 status = htonl(NFS4_OK); 394out_putclient:
391 nfs_put_client(clp); /* balance nfs_find_client */ 395 nfs_put_client(clp); /* balance nfs_find_client */
392out: 396out:
393 dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); 397 dprintk("%s: exit with status = %d\n", __func__, ntohl(status));