dlm: check if workqueues are NULL before flushing/destroying
authorDavid Windsor <dwindsor@redhat.com>
Tue, 2 Apr 2019 12:37:10 +0000 (08:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 05:27:07 +0000 (07:27 +0200)
commite7a41b276974d35bac948f08327d8f4297d739ba
tree6c335179a80e0ccb0db38f5ed87e7535de804747
parent5d59e28c3d1b94d318e3e74d4e9adb327bb116c0
dlm: check if workqueues are NULL before flushing/destroying

[ Upstream commit b355516f450703c9015316e429b66a93dfff0e6f ]

If the DLM lowcomms stack is shut down before any DLM
traffic can be generated, flush_workqueue() and
destroy_workqueue() can be called on empty send and/or recv
workqueues.

Insert guard conditionals to only call flush_workqueue()
and destroy_workqueue() on workqueues that are not NULL.

Signed-off-by: David Windsor <dwindsor@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/dlm/lowcomms.c