summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-07-09 14:06:17 +0000
committerphk <phk@FreeBSD.org>2004-07-09 14:06:17 +0000
commit5be6baa85c81107025f55b6b0b6b9997d83fb135 (patch)
tree1261344c75db1b33f1fe67a2feab39318eecb7dc
parent98f388939d11b9e5db684c11496611b81fa9d66a (diff)
downloadFreeBSD-src-5be6baa85c81107025f55b6b0b6b9997d83fb135.zip
FreeBSD-src-5be6baa85c81107025f55b6b0b6b9997d83fb135.tar.gz
Only detach consumers which are attached when we wither stuff away.
Pointed out by: pjd
-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 d65b2b5..2e95769 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -317,7 +317,8 @@ g_wither_washer()
result |= 1;
continue;
}
- g_detach(cp);
+ if (cp->provider != NULL)
+ g_detach(cp);
g_destroy_consumer(cp);
result |= 2;
}
OpenPOWER on IntegriCloud