[Ocfs2-commits] zab commits r2043 - trunk/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Mar 23 20:06:28 CST 2005
Author: zab
Signed-off-by: mfasheh
Date: 2005-03-23 20:06:26 -0600 (Wed, 23 Mar 2005)
New Revision: 2043
Modified:
trunk/fs/ocfs2/dlm/dlmthread.c
Log:
o don't list_add the purge list_head twice. this presented as a double
free of the lockres from the corrupted purge_list.
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/dlm/dlmthread.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmthread.c 2005-03-23 02:07:04 UTC (rev 2042)
+++ trunk/fs/ocfs2/dlm/dlmthread.c 2005-03-24 02:06:26 UTC (rev 2043)
@@ -98,13 +98,12 @@
assert_spin_locked(&dlm->spinlock);
assert_spin_locked(&res->spinlock);
- if (__dlm_lockres_unused(res)) {
+ if (__dlm_lockres_unused(res) && list_empty(&res->purge)) {
dlmprintk("putting lockres %.*s from purge list\n",
res->lockname.len, res->lockname.name);
res->last_used = jiffies;
- list_add_tail(&res->purge,
- &dlm->purge_list);
+ list_add_tail(&res->purge, &dlm->purge_list);
dlm->purge_count++;
} else if (!list_empty(&res->purge)) {
dlmprintk("removing lockres %.*s from purge list\n",
More information about the Ocfs2-commits
mailing list