]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
ocfs2/dlm: Add missing dlm_lockres_put()s in migration path
authorSunil Mushran <sunil.mushran@oracle.com>
Sat, 1 Mar 2008 22:04:21 +0000 (14:04 -0800)
committerMark Fasheh <mark.fasheh@oracle.com>
Mon, 10 Mar 2008 22:14:11 +0000 (15:14 -0700)
commit52987e2ab456c1a828046494aac53819b1454341
treec6ce00323a57c277fefd271f17d0542f35fc3055
parent2c5c54aca9d0263f81bd4886232835ba31f7635a
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>
fs/ocfs2/dlm/dlmcommon.h
fs/ocfs2/dlm/dlmrecovery.c