[Ocfs2-commits] khackel commits r2717 - trunk/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Dec 7 01:34:24 CST 2005
Author: khackel
Signed-off-by: mfasheh
Date: 2005-12-07 01:34:21 -0600 (Wed, 07 Dec 2005)
New Revision: 2717
Modified:
trunk/fs/ocfs2/dlm/dlmdomain.c
Log:
* when purging the last of the lock resources during umount, grab a reference
to each lockres to avoid null pointer deref
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/dlm/dlmdomain.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmdomain.c 2005-12-07 07:27:37 UTC (rev 2716)
+++ trunk/fs/ocfs2/dlm/dlmdomain.c 2005-12-07 07:34:21 UTC (rev 2717)
@@ -307,6 +307,8 @@
while (!list_empty(&dlm->resources[i])) {
res = list_entry(dlm->resources[i].next,
struct dlm_lock_resource, list);
+ /* need reference when manually grabbing lockres */
+ dlm_lockres_get(res);
/* this should unhash the lockres
* and exit with dlm->spinlock */
mlog(0, "purging res=%p\n", res);
@@ -320,9 +322,11 @@
spin_unlock(&dlm->spinlock);
dlm_kick_thread(dlm, res);
wait_event(dlm->ast_wq, !dlm_lockres_is_dirty(dlm, res));
+ dlm_lockres_put(res);
goto restart;
}
dlm_purge_lockres(dlm, res);
+ dlm_lockres_put(res);
}
}
spin_unlock(&dlm->spinlock);
More information about the Ocfs2-commits
mailing list