Unlock giant when calling shutdown_nice()
This commit is contained in:
parent
b799e21b28
commit
026fb270ca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331298
@ -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