]> git.baikalelectronics.ru Git - kernel.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)
commit8b89c026fd5f515033044ef1fd0b7f17c7f0934b
treec6ce00323a57c277fefd271f17d0542f35fc3055
parent79e0c6245100bdbaccad16dc977760c2122d7394
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