]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
dlm: fix shutdown cleanup
authorDavid Teigland <teigland@redhat.com>
Thu, 13 Nov 2008 19:22:34 +0000 (13:22 -0600)
committerDavid Teigland <teigland@redhat.com>
Thu, 13 Nov 2008 19:22:34 +0000 (13:22 -0600)
Fixes a regression from commit 0f8e0d9a317406612700426fad3efab0b7bbc467,
"dlm: allow multiple lockspace creates".

An extraneous 'else' slipped into a code fragment being moved from
release_lockspace() to dlm_release_lockspace().  The result of the
unwanted 'else' is that dlm threads and structures are not stopped
and cleaned up when the final dlm lockspace is removed.  Trying to
create a new lockspace again afterward will fail with
"kmem_cache_create: duplicate cache dlm_conn" because the cache
was not previously destroyed.

Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lockspace.c

index d910501de6d2ca9d4fc8ed1a1cda8d9a1aca1519..8d86b7960f0df7527fed5494230676b137b4f63b 100644 (file)
@@ -812,7 +812,7 @@ int dlm_release_lockspace(void *lockspace, int force)
        error = release_lockspace(ls, force);
        if (!error)
                ls_count--;
-       else if (!ls_count)
+       if (!ls_count)
                threads_stop();
        mutex_unlock(&ls_lock);