[Ocfs2-devel] [PATCH 05/18] ocfs2_dlm: Add missing dlm_lockres_put()s

Sunil Mushran sunil.mushran at oracle.com
Mon Feb 25 12:20:49 PST 2008


This patch adds few missing puts in dlm_master_request_handler().

Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
---
 fs/ocfs2/dlm/dlmmaster.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 8e3c40e..d07a30a 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -1718,7 +1718,13 @@ send_response:
 		if (ret < 0) {
 			mlog(ML_ERROR, "failed to dispatch assert master work\n");
 			response = DLM_MASTER_RESP_ERROR;
+			/* incase dlm_assert_master_worker() was not called */
+			dlm_lockres_put(res);
 		}
+	} else {
+		/* match the put in dlm_assert_master_worker() */
+		if (res)
+			dlm_lockres_put(res);
 	}
 
 	dlm_put(dlm);
-- 
1.5.2.5




More information about the Ocfs2-devel mailing list