Author: trasz
Date: Tue Nov 14 17:54:00 2017
New Revision: 325818
URL: https://svnweb.freebsd.org/changeset/base/325818

Log:
  MFC r324199:
  
  Clear G_CF_ORPHAN when attaching. This fixes cases where the same
  GEOM consumer can be orphaned, and then reattach to another provider.
  
  From a user point of view, this makes gmountver(4) work again.

Modified:
  stable/11/sys/geom/geom_subr.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/geom/geom_subr.c
==============================================================================
--- stable/11/sys/geom/geom_subr.c      Tue Nov 14 17:46:37 2017        
(r325817)
+++ stable/11/sys/geom/geom_subr.c      Tue Nov 14 17:54:00 2017        
(r325818)
@@ -816,6 +816,7 @@ g_attach(struct g_consumer *cp, struct g_provider *pp)
        g_trace(G_T_TOPOLOGY, "g_attach(%p, %p)", cp, pp);
        KASSERT(cp->provider == NULL, ("attach but attached"));
        cp->provider = pp;
+       cp->flags &= ~G_CF_ORPHAN;
        LIST_INSERT_HEAD(&pp->consumers, cp, consumers);
        error = redo_rank(cp->geom);
        if (error) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to