diff options
author | pjd <pjd@FreeBSD.org> | 2013-03-14 23:07:01 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2013-03-14 23:07:01 +0000 |
commit | 2e500238ddb670ec730cc2561f406d256e2a2aa9 (patch) | |
tree | f5063ce294533b8596cde91a06bfd82957b1c0da /sys/geom/gate | |
parent | 5f4ba049f3af4ababfbb5158ca530215cb0eae0c (diff) | |
download | FreeBSD-src-2e500238ddb670ec730cc2561f406d256e2a2aa9.zip FreeBSD-src-2e500238ddb670ec730cc2561f406d256e2a2aa9.tar.gz |
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.
Diffstat (limited to 'sys/geom/gate')
-rw-r--r-- | sys/geom/gate/g_gate.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |