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.
This commit is contained in:
Pawel Jakub Dawidek 2013-03-14 23:07:01 +00:00
parent 9bb2b7f535
commit c4d2d401f8

View File

@ -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;