summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_disk.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-03-18 07:01:31 +0000
committerphk <phk@FreeBSD.org>2005-03-18 07:01:31 +0000
commit05ad1057532ca09b1dcee1676dcf79dfb12fe679 (patch)
tree062542ae673b3b8dae792e6c31a526615d889295 /sys/geom/geom_disk.c
parentaaa532d7788681034547ebcf7dc4ccf59b455ec7 (diff)
downloadFreeBSD-src-05ad1057532ca09b1dcee1676dcf79dfb12fe679.zip
FreeBSD-src-05ad1057532ca09b1dcee1676dcf79dfb12fe679.tar.gz
After rejecting the bio request early, return instead of panicing.
Found by: Coverity (ID#450)
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r--sys/geom/geom_disk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index c4210c2..53c8c15 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -240,8 +240,10 @@ g_disk_start(struct bio *bp)
off_t off;
dp = bp->bio_to->geom->softc;
- if (dp == NULL || dp->d_destroyed)
+ if (dp == NULL || dp->d_destroyed) {
g_io_deliver(bp, ENXIO);
+ return;
+ }
error = EJUSTRETURN;
switch(bp->bio_cmd) {
case BIO_DELETE:
OpenPOWER on IntegriCloud