From bcd8cd859e694bc4a4dfb6fdb8f55de3a96833b4 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 1 Mar 2023 10:07:56 -0500 Subject: [PATCH] buf: Make buf_daemon_shutdown() a no-op after a panic As in commit 9d7cc536e261a7, there is no need to do anything in this context. MFC after: 1 week --- sys/kern/vfs_bio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index b40ee382c42..f1089964a04 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3419,6 +3419,9 @@ buf_daemon_shutdown(void *arg __unused, int howto __unused) { int error; + if (KERNEL_PANICKED()) + return; + mtx_lock(&bdlock); bd_shutdown = true; wakeup(&bd_request);