aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ocfs2/dlm/dlmmaster.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 320081d53f22..ea6b89577860 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -1663,7 +1663,12 @@ way_up_top:
1663 dlm_put_mle(tmpmle); 1663 dlm_put_mle(tmpmle);
1664 } 1664 }
1665send_response: 1665send_response:
1666 1666 /*
1667 * __dlm_lookup_lockres() grabbed a reference to this lockres.
1668 * The reference is released by dlm_assert_master_worker() under
1669 * the call to dlm_dispatch_assert_master(). If
1670 * dlm_assert_master_worker() isn't called, we drop it here.
1671 */
1667 if (dispatch_assert) { 1672 if (dispatch_assert) {
1668 if (response != DLM_MASTER_RESP_YES) 1673 if (response != DLM_MASTER_RESP_YES)
1669 mlog(ML_ERROR, "invalid response %d\n", response); 1674 mlog(ML_ERROR, "invalid response %d\n", response);
@@ -1678,7 +1683,11 @@ send_response:
1678 if (ret < 0) { 1683 if (ret < 0) {
1679 mlog(ML_ERROR, "failed to dispatch assert master work\n"); 1684 mlog(ML_ERROR, "failed to dispatch assert master work\n");
1680 response = DLM_MASTER_RESP_ERROR; 1685 response = DLM_MASTER_RESP_ERROR;
1686 dlm_lockres_put(res);
1681 } 1687 }
1688 } else {
1689 if (res)
1690 dlm_lockres_put(res);
1682 } 1691 }
1683 1692
1684 dlm_put(dlm); 1693 dlm_put(dlm);