提交 bae0ac0e 编写于 作者: A Andy Adamson 提交者: Trond Myklebust

nfs41: fix nfs4_callback_recallslot

Return NFS4_OK if target high slotid equals enforced high slotid.
Fix nfs_client reference leak.
Signed-off-by: NAndy Adamson <andros@netapp.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 104aeba4
...@@ -381,13 +381,17 @@ unsigned nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy) ...@@ -381,13 +381,17 @@ unsigned nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy)
fc_tbl = &clp->cl_session->fc_slot_table; fc_tbl = &clp->cl_session->fc_slot_table;
status = htonl(NFS4ERR_BAD_HIGH_SLOT); status = htonl(NFS4ERR_BAD_HIGH_SLOT);
if (args->crsa_target_max_slots >= fc_tbl->max_slots || if (args->crsa_target_max_slots > fc_tbl->max_slots ||
args->crsa_target_max_slots < 1) args->crsa_target_max_slots < 1)
goto out; goto out_putclient;
status = htonl(NFS4_OK);
if (args->crsa_target_max_slots == fc_tbl->max_slots)
goto out_putclient;
fc_tbl->target_max_slots = args->crsa_target_max_slots; fc_tbl->target_max_slots = args->crsa_target_max_slots;
nfs41_handle_recall_slot(clp); nfs41_handle_recall_slot(clp);
status = htonl(NFS4_OK); out_putclient:
nfs_put_client(clp); /* balance nfs_find_client */ nfs_put_client(clp); /* balance nfs_find_client */
out: out:
dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); dprintk("%s: exit with status = %d\n", __func__, ntohl(status));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册