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
This commit is contained in:
parent
a2dfffb989
commit
38da0c96dc
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user