buf: Make bufspace_daemon_shutdown() a no-op after a panic

This function doesn't need to do anything in that context, and calling
wakeup() can lead to recursive panics.

Discussed with:	mhorne
MFC after:	1 week
This commit is contained in:
Mark Johnston 2023-02-23 21:56:36 -05:00
parent 8c8574acb8
commit 9d7cc536e2

View File

@ -766,6 +766,9 @@ bufspace_daemon_shutdown(void *arg, int howto __unused)
struct bufdomain *bd = arg;
int error;
if (KERNEL_PANICKED())
return;
BD_RUN_LOCK(bd);
bd->bd_shutdown = true;
wakeup(&bd->bd_running);