Unlock giant when calling shutdown_nice()
This commit is contained in:
parent
95bc67def2
commit
17b7d8a1eb
@ -3858,22 +3858,28 @@ scgetc(sc_softc_t *sc, u_int flags, struct sc_cnstate *sp)
|
||||
|
||||
case RBT:
|
||||
#ifndef SC_DISABLE_REBOOT
|
||||
if (enable_reboot && !(flags & SCGETC_CN))
|
||||
if (enable_reboot && !(flags & SCGETC_CN)) {
|
||||
mtx_unlock(&Giant);
|
||||
shutdown_nice(0);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case HALT:
|
||||
#ifndef SC_DISABLE_REBOOT
|
||||
if (enable_reboot && !(flags & SCGETC_CN))
|
||||
if (enable_reboot && !(flags & SCGETC_CN)) {
|
||||
mtx_unlock(&Giant);
|
||||
shutdown_nice(RB_HALT);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case PDWN:
|
||||
#ifndef SC_DISABLE_REBOOT
|
||||
if (enable_reboot && !(flags & SCGETC_CN))
|
||||
if (enable_reboot && !(flags & SCGETC_CN)) {
|
||||
mtx_unlock(&Giant);
|
||||
shutdown_nice(RB_HALT|RB_POWEROFF);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user