summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_io.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-09-11 00:49:02 +0000
committerphk <phk@FreeBSD.org>2003-09-11 00:49:02 +0000
commit99d28702f54161da2e19f22b24e2ea083a4b12b0 (patch)
tree757959e4b8e6337fa6127a2add98610d88e283d6 /sys/geom/geom_io.c
parent6a4eda4c4aa5d275b031c3010bbda60d17c2d2c3 (diff)
downloadFreeBSD-src-99d28702f54161da2e19f22b24e2ea083a4b12b0.zip
FreeBSD-src-99d28702f54161da2e19f22b24e2ea083a4b12b0.tar.gz
Reorder a couple of KASSERTS to give more sensible messages.
Found by: GEOM 101 class of '03
Diffstat (limited to 'sys/geom/geom_io.c')
-rw-r--r--sys/geom/geom_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index 65828d9..db3e743 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -236,10 +236,10 @@ g_io_request(struct bio *bp, struct g_consumer *cp)
{
struct g_provider *pp;
- pp = cp->provider;
KASSERT(cp != NULL, ("NULL cp in g_io_request"));
KASSERT(bp != NULL, ("NULL bp in g_io_request"));
KASSERT(bp->bio_data != NULL, ("NULL bp->data in g_io_request"));
+ pp = cp->provider;
KASSERT(pp != NULL, ("consumer not attached in g_io_request"));
bp->bio_from = cp;
@@ -267,9 +267,9 @@ g_io_deliver(struct bio *bp, int error)
struct g_consumer *cp;
struct g_provider *pp;
+ KASSERT(bp != NULL, ("NULL bp in g_io_deliver"));
cp = bp->bio_from;
pp = bp->bio_to;
- KASSERT(bp != NULL, ("NULL bp in g_io_deliver"));
KASSERT(cp != NULL, ("NULL bio_from in g_io_deliver"));
KASSERT(cp->geom != NULL, ("NULL bio_from->geom in g_io_deliver"));
KASSERT(pp != NULL, ("NULL bio_to in g_io_deliver"));
OpenPOWER on IntegriCloud