diff options
| author | Peter Jeremy <peterj@FreeBSD.org> | 2022-01-29 10:15:51 +0000 |
|---|---|---|
| committer | Peter Jeremy <peterj@FreeBSD.org> | 2022-01-29 10:15:51 +0000 |
| commit | afcd1210246bebd8ed9bdaf31bd5218630af4cdc (patch) | |
| tree | 750bcfaf3368c24b11234444d6d2499992ab16e8 /sys | |
| parent | 217481a3332783d03366c4512b0b164764aa6c6e (diff) | |
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/geom/gate/g_gate.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c index 14ec0cc2e9d2..4e98d78c1e43 100644 --- a/sys/geom/gate/g_gate.c +++ b/sys/geom/gate/g_gate.c @@ -861,11 +861,10 @@ g_gate_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct threa 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 && |
