diff options
author | Mark Johnston <markj@FreeBSD.org> | 2022-01-27 14:58:19 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2022-01-27 14:58:19 +0000 |
commit | 38da0c96dc1b4698931f65d8d58e864dfc3a600e (patch) | |
tree | 112956dc551c6ef1852fb749811dfaa13085d6d1 /sys/geom | |
parent | a2dfffb98917a57bfacb155b9d7d423c3e8ff792 (diff) | |
download | src-38da0c96dc1b4698931f65d8d58e864dfc3a600e.tar.gz src-38da0c96dc1b4698931f65d8d58e864dfc3a600e.zip |
geom: Assert that BIO_SPEEDUP BIOs have bio_data set to NULL
Like BIO_FLUSH, there is no reason for consumers to pass a BIO_SPEEDUP
request with non-NULL bio_data, so assert this.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 6ec90741a7e2..a5cb8c7279e4 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -521,7 +521,7 @@ g_io_request(struct bio *bp, struct g_consumer *cp) KASSERT(bp->bio_data != NULL, ("NULL bp->data in g_io_request(cmd=%hu)", bp->bio_cmd)); } - if (cmd == BIO_DELETE || cmd == BIO_FLUSH) { + if (cmd == BIO_DELETE || cmd == BIO_FLUSH || cmd == BIO_SPEEDUP) { KASSERT(bp->bio_data == NULL, ("non-NULL bp->data in g_io_request(cmd=%hu)", bp->bio_cmd)); |