[openib-general] [PATCH][MINOR} OpenSM/osm_sa_mcmember_record.c: Move some osm_log messages outside of holding lock
Hal Rosenstock
halr at voltaire.com
Wed Dec 6 07:08:19 PST 2006
OpenSM/osm_sa_mcmember_record.c: Move some osm_log messages outside of
holding lock
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
diff --git a/osm/opensm/osm_sa_mcmember_record.c b/osm/opensm/osm_sa_mcmember_record.c
index 4b06bab..31d1fb5 100644
--- a/osm/opensm/osm_sa_mcmember_record.c
+++ b/osm/opensm/osm_sa_mcmember_record.c
@@ -1447,12 +1447,6 @@ __osm_mcmr_rcv_leave_mgrp(
port_join_state & ~(p_recvd_mcmember_rec->scope_state & 0x0F);
if (new_join_state)
{
- osm_log( p_rcv->p_log, OSM_LOG_DEBUG,
- "__osm_mcmr_rcv_leave_mgrp: "
- "After update JoinState != 0. Updating from 0x%X to 0x%X\n",
- port_join_state,
- new_join_state
- );
/* Just update the result JoinState */
p_mcm_port->scope_state =
new_join_state | (p_mcm_port->scope_state & 0xf0);
@@ -1460,6 +1454,13 @@ __osm_mcmr_rcv_leave_mgrp(
mcmember_rec.scope_state = p_mcm_port->scope_state;
CL_PLOCK_RELEASE( p_rcv->p_lock );
+
+ osm_log( p_rcv->p_log, OSM_LOG_DEBUG,
+ "__osm_mcmr_rcv_leave_mgrp: "
+ "After update JoinState != 0. Updating from 0x%X to 0x%X\n",
+ port_join_state,
+ new_join_state
+ );
}
else
{
@@ -1649,6 +1650,8 @@ __osm_mcmr_rcv_join_mgrp(
}
else
{
+ CL_PLOCK_RELEASE( p_rcv->p_lock );
+
osm_log( p_rcv->p_log, OSM_LOG_ERROR,
"__osm_mcmr_rcv_join_mgrp: ERR 1B11: "
"method = %s, "
@@ -1665,7 +1668,6 @@ __osm_mcmr_rcv_join_mgrp(
cl_ntoh64( p_recvd_mcmember_rec->mgid.unicast.interface_id ),
cl_ntoh64( portguid ) );
- CL_PLOCK_RELEASE( p_rcv->p_lock );
sa_status = IB_SA_MAD_STATUS_INSUF_COMPS;
osm_sa_send_error( p_rcv->p_resp, p_madw, sa_status );
goto Exit;
@@ -1713,6 +1715,11 @@ __osm_mcmr_rcv_join_mgrp(
if (!valid)
{
+ /* since we might have created the new group we need to cleanup */
+ __cleanup_mgrp(p_rcv, mlid);
+
+ CL_PLOCK_RELEASE( p_rcv->p_lock );
+
osm_log( p_rcv->p_log, OSM_LOG_ERROR,
"__osm_mcmr_rcv_join_mgrp: ERR 1B12: "
"__validate_more_comp_fields, __validate_port_caps, "
@@ -1720,11 +1727,6 @@ __osm_mcmr_rcv_join_mgrp(
"sending IB_SA_MAD_STATUS_REQ_INVALID\n",
cl_ntoh64( portguid ) );
- /* since we might have created the new group we need to cleanup */
- __cleanup_mgrp(p_rcv, mlid);
-
- CL_PLOCK_RELEASE( p_rcv->p_lock );
-
sa_status = IB_SA_MAD_STATUS_REQ_INVALID;
osm_sa_send_error( p_rcv->p_resp, p_madw, sa_status );
goto Exit;
@@ -1746,13 +1748,13 @@ __osm_mcmr_rcv_join_mgrp(
&p_mcmr_port);
if (!valid)
{
+ CL_PLOCK_RELEASE( p_rcv->p_lock );
+
osm_log( p_rcv->p_log, OSM_LOG_ERROR,
"__osm_mcmr_rcv_join_mgrp: ERR 1B13: "
"__validate_modify failed, "
"sending IB_SA_MAD_STATUS_REQ_INVALID\n" );
- CL_PLOCK_RELEASE( p_rcv->p_lock );
-
sa_status = IB_SA_MAD_STATUS_REQ_INVALID;
osm_sa_send_error( p_rcv->p_resp, p_madw, sa_status );
goto Exit;
More information about the general
mailing list