summaryrefslogtreecommitdiff
path: root/fs/ocfs2/dlm/dlmdomain.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-29 01:02:03 +0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-29 01:02:03 +0400
commite5c465f5d957ab581bc79d3ce981281fe73021a3 (patch)
treed37f808b94d0cb46e88108d422da2c22deb721b7 /fs/ocfs2/dlm/dlmdomain.c
parentd0a9af809124c432297a7c4a3bcf98cbfdb4036a (diff)
parent2f5bf1f2d061dea5146aa283685ce2b00cea2f3d (diff)
downloadlinux-e5c465f5d957ab581bc79d3ce981281fe73021a3.tar.xz
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: ocfs2_dlm: Check for migrateable lockres in dlm_empty_lockres() ocfs2_dlm: Fix lockres ref counting bug
Diffstat (limited to 'fs/ocfs2/dlm/dlmdomain.c')
-rw-r--r--fs/ocfs2/dlm/dlmdomain.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c
index 6087c4749fee..c558442a0b44 100644
--- a/fs/ocfs2/dlm/dlmdomain.c
+++ b/fs/ocfs2/dlm/dlmdomain.c
@@ -138,8 +138,10 @@ static void dlm_unregister_domain_handlers(struct dlm_ctxt *dlm);
void __dlm_unhash_lockres(struct dlm_lock_resource *lockres)
{
- hlist_del_init(&lockres->hash_node);
- dlm_lockres_put(lockres);
+ if (!hlist_unhashed(&lockres->hash_node)) {
+ hlist_del_init(&lockres->hash_node);
+ dlm_lockres_put(lockres);
+ }
}
void __dlm_insert_lockres(struct dlm_ctxt *dlm,
@@ -655,6 +657,8 @@ void dlm_unregister_domain(struct dlm_ctxt *dlm)
dlm_kick_thread(dlm, NULL);
while (dlm_migrate_all_locks(dlm)) {
+ /* Give dlm_thread time to purge the lockres' */
+ msleep(500);
mlog(0, "%s: more migration to do\n", dlm->name);
}
dlm_mark_domain_leaving(dlm);