svn commit: r246241 - stable/9/sys/geom/mirror

Andriy Gapon avg at FreeBSD.org
Sat Feb 2 11:30:53 UTC 2013


Author: avg
Date: Sat Feb  2 11:30:53 2013
New Revision: 246241
URL: http://svnweb.freebsd.org/changeset/base/246241

Log:
  MFC r245946: g_mirror: g_getattr() failure should not be fatal
  
  PR:		kern/175323

Modified:
  stable/9/sys/geom/mirror/g_mirror.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/mirror/g_mirror.c
==============================================================================
--- stable/9/sys/geom/mirror/g_mirror.c	Sat Feb  2 11:25:10 2013	(r246240)
+++ stable/9/sys/geom/mirror/g_mirror.c	Sat Feb  2 11:30:53 2013	(r246241)
@@ -456,9 +456,7 @@ g_mirror_init_disk(struct g_mirror_softc
 	disk->d_priority = md->md_priority;
 	disk->d_flags = md->md_dflags;
 	error = g_getattr("GEOM::candelete", disk->d_consumer, &i);
-	if (error != 0)
-		goto fail;
-	if (i)
+	if (error == 0 && i != 0)
 		disk->d_flags |= G_MIRROR_DISK_FLAG_CANDELETE;
 	if (md->md_provider[0] != '\0')
 		disk->d_flags |= G_MIRROR_DISK_FLAG_HARDCODED;


More information about the svn-src-stable-9 mailing list