From 2e500238ddb670ec730cc2561f406d256e2a2aa9 Mon Sep 17 00:00:00 2001 From: pjd Date: Thu, 14 Mar 2013 23:07:01 +0000 Subject: We don't need buffer to handle BIO_DELETE, so don't check buffer size for it. This fixes handling BIO_DELETE larger than MAXPHYS. --- sys/geom/gate/g_gate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/geom') diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c index d1ddd40..c44993a 100644 --- a/sys/geom/gate/g_gate.c +++ b/sys/geom/gate/g_gate.c @@ -813,7 +813,7 @@ g_gate_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct threa } } ggio->gctl_cmd = bp->bio_cmd; - if ((bp->bio_cmd == BIO_DELETE || bp->bio_cmd == BIO_WRITE) && + if (bp->bio_cmd == BIO_WRITE && bp->bio_length > ggio->gctl_length) { mtx_unlock(&sc->sc_queue_mtx); ggio->gctl_length = bp->bio_length; -- cgit v1.1