summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/md/md.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index f4230a2..bb9e64b 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -374,8 +374,11 @@ g_md_access(struct g_provider *pp, int r, int w, int e)
struct md_s *sc;
sc = pp->geom->softc;
- if (sc == NULL)
+ if (sc == NULL) {
+ if (r <= 0 && w <= 0 && e <= 0)
+ return (0);
return (ENXIO);
+ }
r += pp->acr;
w += pp->acw;
e += pp->ace;
OpenPOWER on IntegriCloud