Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 278afcbf authored by David Teigland's avatar David Teigland
Browse files

dlm: fix shutdown cleanup



Fixes a regression from commit 0f8e0d9a,
"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: default avatarDavid Teigland <teigland@redhat.com>
parent 3edac25f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -812,7 +812,7 @@ int dlm_release_lockspace(void *lockspace, int force)
	error = release_lockspace(ls, force);
	error = release_lockspace(ls, force);
	if (!error)
	if (!error)
		ls_count--;
		ls_count--;
	else if (!ls_count)
	if (!ls_count)
		threads_stop();
		threads_stop();
	mutex_unlock(&ls_lock);
	mutex_unlock(&ls_lock);