diff mbox

[V2] ocfs2/dlm: should put mle when goto kill in dlm_assert_master_handler

Message ID 5420EFBD.1060502@huawei.com
State New, archived
Headers show

Commit Message

Alex Chen Sept. 23, 2014, 3:57 a.m. UTC
In dlm_assert_master_handler, the mle is get in dlm_find_mle, should be
put when goto kill, otherwise, this mle will never be released.

Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Reviewed-by: joyce.xue <xuejiufei@huawei.com>
 fs/ocfs2/dlm/dlmmaster.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox


diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 3ec906e..0a2de18 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -2037,6 +2037,10 @@  kill:
 	     "and killing the other node now!  This node is OK and can continue.\n");
+	spin_lock(&dlm->master_lock);
+	if (mle)
+		__dlm_put_mle(mle);
+	spin_unlock(&dlm->master_lock);
 	*ret_data = (void *)res;