From 1781f9ef6f5da57feae3a9cf162e416e5c2c6774 Mon Sep 17 00:00:00 2001 From: markj Date: Fri, 3 Apr 2020 13:57:41 +0000 Subject: [PATCH] geom_journal: Only stop the switcher process if one was started. PR: 243196 MFC after: 1 week --- sys/geom/journal/g_journal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/geom/journal/g_journal.c b/sys/geom/journal/g_journal.c index 4bd35f972509..7b9b81337006 100644 --- a/sys/geom/journal/g_journal.c +++ b/sys/geom/journal/g_journal.c @@ -2757,7 +2757,8 @@ g_journal_fini(struct g_class *mp) } if (g_journal_event_lowmem != NULL) EVENTHANDLER_DEREGISTER(vm_lowmem, g_journal_event_lowmem); - g_journal_stop_switcher(); + if (g_journal_switcher_proc != NULL) + g_journal_stop_switcher(); } DECLARE_GEOM_CLASS(g_journal_class, g_journal);