From d2bda4e0323c7eb2651340ed41a071fa588e25a4 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 24 Oct 2003 07:20:13 +0000 Subject: [PATCH] Backswards is as backwards does: If we're MPSAFE, then we don't need giant, which implies that we need to take out giant it we're NOT MPSAFE. # I can't believe the number of people that looked at this failed to # detect this. --- sys/dev/pccbb/pccbb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index 27a7fb1fbcca..fb9926f9ebb9 100644 --- a/sys/dev/pccbb/pccbb.c +++ b/sys/dev/pccbb/pccbb.c @@ -1162,10 +1162,10 @@ cbb_intr(void *arg) */ if (sc->flags & CBB_CARD_OK) { STAILQ_FOREACH(ih, &sc->intr_handlers, entries) { - if ((ih->flags & INTR_MPSAFE) != 0) + if ((ih->flags & INTR_MPSAFE) == 0) mtx_lock(&Giant); (*ih->intr)(ih->arg); - if ((ih->flags & INTR_MPSAFE) != 0) + if ((ih->flags & INTR_MPSAFE) == 0) mtx_unlock(&Giant); } }