aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmcommon.h
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2008-03-01 17:04:21 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2008-03-10 18:14:11 -0400
commit52987e2ab456c1a828046494aac53819b1454341 (patch)
treec6ce00323a57c277fefd271f17d0542f35fc3055 /fs/ocfs2/dlm/dlmcommon.h
parent2c5c54aca9d0263f81bd4886232835ba31f7635a (diff)
ocfs2/dlm: Add missing dlm_lockres_put()s in migration path
During migration, the recovery master node may be asked to master a lockres it may not know about. In that case, it would not only have to create a lockres and add it to the hash, but also remember to to do the _put_ corresponding to the kref_init in dlm_init_lockres(), as soon as the migration is completed. Yes, we don't wait for the dlm_purge_lockres() to do that matching put. Note the ref added for it being in the hash protects the lockres from being freed prematurely. This patch adds that missing put, as described above, to plug a memleak. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmcommon.h')
-rw-r--r--fs/ocfs2/dlm/dlmcommon.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h
index 1f939631ab74..dc8ea666efdb 100644
--- a/fs/ocfs2/dlm/dlmcommon.h
+++ b/fs/ocfs2/dlm/dlmcommon.h
@@ -176,6 +176,7 @@ struct dlm_mig_lockres_priv
176{ 176{
177 struct dlm_lock_resource *lockres; 177 struct dlm_lock_resource *lockres;
178 u8 real_master; 178 u8 real_master;
179 u8 extra_ref;
179}; 180};
180 181
181struct dlm_assert_master_priv 182struct dlm_assert_master_priv