summaryrefslogtreecommitdiffstats
path: root/sys/geom/multipath/g_multipath.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/multipath/g_multipath.c')
-rw-r--r--sys/geom/multipath/g_multipath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c
index 6644532..b461747 100644
--- a/sys/geom/multipath/g_multipath.c
+++ b/sys/geom/multipath/g_multipath.c
@@ -470,7 +470,7 @@ g_multipath_access(struct g_provider *pp, int dr, int dw, int de)
gp = pp->geom;
/* Error used if we have no valid consumers. */
- error = ENXIO;
+ error = (dr > 0 || dw > 0 || de > 0) ? ENXIO : 0;
LIST_FOREACH(cp, &gp->consumer, consumer) {
if (cp->index & MP_WITHER)
OpenPOWER on IntegriCloud