summaryrefslogtreecommitdiffstats
path: root/sys/geom/bde/g_bde_work.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/bde/g_bde_work.c')
-rw-r--r--sys/geom/bde/g_bde_work.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/geom/bde/g_bde_work.c b/sys/geom/bde/g_bde_work.c
index 9fd0f98..036f01e 100644
--- a/sys/geom/bde/g_bde_work.c
+++ b/sys/geom/bde/g_bde_work.c
@@ -479,7 +479,10 @@ g_bde_read_done(struct bio *bp)
sc = bp->bio_caller2;
mtx_lock(&sc->worklist_mutex);
sp->error = bp->bio_error;
- sp->state = VALID;
+ if (sp->error == 0)
+ sp->state = VALID;
+ else
+ sp->state = JUNK;
wakeup(sc);
g_destroy_bio(bp);
mtx_unlock(&sc->worklist_mutex);
OpenPOWER on IntegriCloud