Skip to content

Commit

Permalink
dlm: fix shutdown cleanup
Browse files Browse the repository at this point in the history
Fixes a regression from commit 0f8e0d9,
"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>
  • Loading branch information
David Teigland committed Nov 13, 2008
1 parent 3edac25 commit 278afcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/dlm/lockspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 278afcb

Please sign in to comment.