From 3e867f24cbe27478843c2f07cd1654e38b672bc2 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 21 Mar 2018 14:46:59 +0000 Subject: [PATCH] bufshutdown is no longer called with Giant held, so there's no need to drop or pickup Giant anymore. Remove that code and adjust comments. --- sys/kern/vfs_bio.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 092f4913abae..1e923cc9ea03 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1376,25 +1376,20 @@ bufshutdown(int show_busybufs) #ifdef PREEMPTION /* - * Drop Giant and spin for a while to allow - * interrupt threads to run. + * Spin for a while to allow interrupt threads to run. */ - DROP_GIANT(); DELAY(50000 * iter); - PICKUP_GIANT(); #else /* - * Drop Giant and context switch several times to - * allow interrupt threads to run. + * Context switch several times to allow interrupt + * threads to run. */ - DROP_GIANT(); for (subiter = 0; subiter < 50 * iter; subiter++) { thread_lock(curthread); mi_switch(SW_VOL, NULL); thread_unlock(curthread); DELAY(1000); } - PICKUP_GIANT(); #endif } printf("\n");