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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index 4af0d4a..8bedee9 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -734,11 +734,12 @@ g_access(struct g_consumer *cp, int dcr, int dcw, int dce)
if (!error) {
/*
* If we open first write, spoil any partner consumers.
- * If we close last write, trigger re-taste.
+ * If we close last write and provider is not errored,
+ * trigger re-taste.
*/
if (pp->acw == 0 && dcw != 0)
g_spoil(pp, cp);
- else if (pp->acw != 0 && pp->acw == -dcw &&
+ else if (pp->acw != 0 && pp->acw == -dcw && pp->error == 0 &&
!(pp->geom->flags & G_GEOM_WITHER))
g_post_event(g_new_provider_event, pp, M_WAITOK,
pp, NULL);
OpenPOWER on IntegriCloud