aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/callback_xdr.c')
-rw-r--r--fs/nfs/callback_xdr.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 646cdac73488..976c90608e56 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -752,7 +752,8 @@ preprocess_nfs41_op(int nop, unsigned int op_nr, struct callback_op **op)
752 return htonl(NFS_OK); 752 return htonl(NFS_OK);
753} 753}
754 754
755static void nfs4_callback_free_slot(struct nfs4_session *session) 755static void nfs4_callback_free_slot(struct nfs4_session *session,
756 struct nfs4_slot *slot)
756{ 757{
757 struct nfs4_slot_table *tbl = &session->bc_slot_table; 758 struct nfs4_slot_table *tbl = &session->bc_slot_table;
758 759
@@ -761,15 +762,17 @@ static void nfs4_callback_free_slot(struct nfs4_session *session)
761 * Let the state manager know callback processing done. 762 * Let the state manager know callback processing done.
762 * A single slot, so highest used slotid is either 0 or -1 763 * A single slot, so highest used slotid is either 0 or -1
763 */ 764 */
764 tbl->highest_used_slotid = NFS4_NO_SLOT; 765 nfs4_free_slot(tbl, slot);
765 nfs4_slot_tbl_drain_complete(tbl); 766 nfs4_slot_tbl_drain_complete(tbl);
766 spin_unlock(&tbl->slot_tbl_lock); 767 spin_unlock(&tbl->slot_tbl_lock);
767} 768}
768 769
769static void nfs4_cb_free_slot(struct cb_process_state *cps) 770static void nfs4_cb_free_slot(struct cb_process_state *cps)
770{ 771{
771 if (cps->slotid != NFS4_NO_SLOT) 772 if (cps->slot) {
772 nfs4_callback_free_slot(cps->clp->cl_session); 773 nfs4_callback_free_slot(cps->clp->cl_session, cps->slot);
774 cps->slot = NULL;
775 }
773} 776}
774 777
775#else /* CONFIG_NFS_V4_1 */ 778#else /* CONFIG_NFS_V4_1 */
@@ -893,7 +896,6 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp, void *argp, void *r
893 struct cb_process_state cps = { 896 struct cb_process_state cps = {
894 .drc_status = 0, 897 .drc_status = 0,
895 .clp = NULL, 898 .clp = NULL,
896 .slotid = NFS4_NO_SLOT,
897 .net = SVC_NET(rqstp), 899 .net = SVC_NET(rqstp),
898 }; 900 };
899 unsigned int nops = 0; 901 unsigned int nops = 0;