From: Vladimir Koushnir <[email protected]>

Signed-off-by: Vladimir Koushnir <[email protected]>
Signed-off-by: Hal Rosenstock <[email protected]>
---
 opensm/osm_opensm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/opensm/osm_opensm.c b/opensm/osm_opensm.c
index b3c487f..f2e04f6 100644
--- a/opensm/osm_opensm.c
+++ b/opensm/osm_opensm.c
@@ -132,7 +132,8 @@ void osm_opensm_destroy(IN osm_opensm_t * p_osm)
        cl_disp_shutdown(&p_osm->sminfo_get_disp);
 
        /* dump SA DB */
-       if (p_osm->subn.opt.sa_db_dump)
+       if ((p_osm->sm.p_subn->sm_state == IB_SMINFO_STATE_MASTER) &&
+            p_osm->subn.opt.sa_db_dump)
                osm_sa_db_file_dump(p_osm);
 
        /* do the destruction in reverse order as init */
-- 
1.7.8.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to