Date: Thu, 14 Mar 2013 23:07:01 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248295 - head/sys/geom/gate Message-ID: <201303142307.r2EN71iF056852@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Thu Mar 14 23:07:01 2013 New Revision: 248295 URL: http://svnweb.freebsd.org/changeset/base/248295 Log: 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. Modified: head/sys/geom/gate/g_gate.c Modified: head/sys/geom/gate/g_gate.c ============================================================================== --- head/sys/geom/gate/g_gate.c Thu Mar 14 23:03:48 2013 (r248294) +++ head/sys/geom/gate/g_gate.c Thu Mar 14 23:07:01 2013 (r248295) @@ -813,7 +813,7 @@ g_gate_ioctl(struct cdev *dev, u_long cm } } 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303142307.r2EN71iF056852>