[ofa-general] [PATCH 4/4] RDMA/nes: Clear cm_id only when done with cm_node
Chien Tung
ctung at neteffect.com
Thu Oct 2 07:39:30 PDT 2008
From: Faisal Latif <flatif at neteffect.com>
Clear cm_node->cm_id only when we are really done with it.
Signed-off-by: Faisal Latif <flatif at neteffect.com>
Signed-off-by: Sweta Bhatt <sweta.bhatt at einfochips.com>
Signed-off-by: Chien Tung <ctung at neteffect.com>
--
drivers/infiniband/hw/nes/nes_cm.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 3bf90fb..896297b 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -2008,6 +2008,7 @@ static int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_nod
case NES_CM_STATE_CLOSE_WAIT:
cm_node->state = NES_CM_STATE_LAST_ACK;
send_fin(cm_node, NULL);
+ cm_node->cm_id = NULL;
break;
case NES_CM_STATE_FIN_WAIT1:
case NES_CM_STATE_FIN_WAIT2:
@@ -2015,6 +2016,7 @@ static int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_nod
case NES_CM_STATE_TIME_WAIT:
case NES_CM_STATE_CLOSING:
ret = -1;
+ cm_node->cm_id = NULL;
break;
case NES_CM_STATE_LISTENING:
case NES_CM_STATE_UNKNOWN:
@@ -2029,7 +2031,7 @@ static int mini_cm_close(struct nes_cm_core *cm_core, struct nes_cm_node *cm_nod
ret = rem_ref_cm_node(cm_core, cm_node);
break;
}
- cm_node->cm_id = NULL;
+
return ret;
}
More information about the general
mailing list