summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/geom_subr.c')
-rw-r--r--sys/geom/geom_subr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index b9c9d24..b67c0d5 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -882,12 +882,13 @@ g_handleattr(struct bio *bp, const char *attribute, const void *val, int len)
}
} else if (bp->bio_length == len) {
bcopy(val, bp->bio_data, len);
- bp->bio_completed = len;
} else {
printf("%s: %s bio_length %jd len %d -> EFAULT\n", __func__,
bp->bio_to->name, (intmax_t)bp->bio_length, len);
error = EFAULT;
}
+ if (error == 0)
+ bp->bio_completed = bp->bio_length;
g_io_deliver(bp, error);
return (1);
}
OpenPOWER on IntegriCloud