ack, code review only. /Thanks HansN
On 06/11/2018 06:40 AM, Phat Do wrote:
If a process failed to mds_mdtm_init(), then it exits and holds the mds lock
forever.
Any upcoming MDS init process got stuck at required lock.
This patch will clean up and release mds lock if mds_mdtm_init failed.
---
src/mds/mds_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mds/mds_main.c b/src/mds/mds_main.c
index 7f47178..8c9b1f1 100644
--- a/src/mds/mds_main.c
+++ b/src/mds/mds_main.c
@@ -575,6 +575,11 @@ uint32_t mds_lib_req(NCS_LIB_REQ_INFO *req)
status = mds_mdtm_init(node_id, &mds_tipc_ref);
if (status != NCSCC_RC_SUCCESS) {
/* todo cleanup */
+ syslog(
+ LOG_ERR,
+ "MDS:LIB_CREATE: mds_mdtm_init failed\n");
+ mds_mcm_destroy();
+ osaf_mutex_unlock_ordie(&gl_mds_library_mutex);
return NCSCC_RC_FAILURE;
}
gl_mds_mcm_cb->adest =
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel