Index: sys/geom/gate/g_gate.c =================================================================== --- sys/geom/gate/g_gate.c +++ sys/geom/gate/g_gate.c @@ -861,11 +861,10 @@ mtx_unlock(&sc->sc_queue_mtx); goto start_end; } - if (msleep(sc, &sc->sc_queue_mtx, - PPAUSE | PDROP | PCATCH, "ggwait", 0) != 0) { - ggio->gctl_error = ECANCELED; + error = msleep(sc, &sc->sc_queue_mtx, + PPAUSE | PDROP | PCATCH, "ggwait", 0); + if (error != 0) goto start_end; - } } ggio->gctl_cmd = bp->bio_cmd; if (bp->bio_cmd == BIO_WRITE &&