aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/mirror/g_mirror.c
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2006-07-03 10:32:38 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2006-07-03 10:32:38 +0000
commit1f7fec3cb579a2be476ff88078b7e10380c9af13 (patch)
tree4f634d3e2a484a657730db409940effeec7970f4 /sys/geom/mirror/g_mirror.c
parent8a97c03a7a480077305129a8e1c0fcf004c28f92 (diff)
downloadsrc-1f7fec3cb579a2be476ff88078b7e10380c9af13.tar.gz
src-1f7fec3cb579a2be476ff88078b7e10380c9af13.zip
Notes
Diffstat (limited to 'sys/geom/mirror/g_mirror.c')
-rw-r--r--sys/geom/mirror/g_mirror.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index 27c6b8869770..aa80d2cb1ddf 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -2736,13 +2736,15 @@ g_mirror_access(struct g_provider *pp, int acr, int acw, int ace)
G_MIRROR_DEBUG(2, "Access request for %s: r%dw%de%d.", pp->name, acr,
acw, ace);
+ sc = pp->geom->softc;
+ if (sc == NULL && acr <= 0 && acw <= 0 && ace <= 0)
+ return (0);
+ KASSERT(sc != NULL, ("NULL softc (provider=%s).", pp->name));
+
dcr = pp->acr + acr;
dcw = pp->acw + acw;
dce = pp->ace + ace;
- sc = pp->geom->softc;
- KASSERT(sc != NULL, ("NULL softc (provider=%s).", pp->name));
-
g_topology_unlock();
sx_xlock(&sc->sc_lock);
if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0 ||