Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Feb 2011 22:00:00 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r218721 - projects/graid/head/sys/geom/raid
Message-ID:  <201102152200.p1FM00Rq046658@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Feb 15 22:00:00 2011
New Revision: 218721
URL: http://svn.freebsd.org/changeset/base/218721

Log:
  Move invariant assignments out of the loop.

Modified:
  projects/graid/head/sys/geom/raid/md_intel.c

Modified: projects/graid/head/sys/geom/raid/md_intel.c
==============================================================================
--- projects/graid/head/sys/geom/raid/md_intel.c	Tue Feb 15 21:46:36 2011	(r218720)
+++ projects/graid/head/sys/geom/raid/md_intel.c	Tue Feb 15 22:00:00 2011	(r218721)
@@ -715,9 +715,9 @@ nofit:
 		TAILQ_REMOVE(&olddisk->d_subdisks, sd, sd_next);
 		TAILQ_INSERT_TAIL(&disk->d_subdisks, sd, sd_next);
 		sd->sd_disk = disk;
-		oldpd->pd_disk_pos = -2;
-		pd->pd_disk_pos = disk_pos;
 	}
+	oldpd->pd_disk_pos = -2;
+	pd->pd_disk_pos = disk_pos;
 
 	/* If it was placeholder -- destroy it. */
 	if (olddisk->d_state == G_RAID_DISK_S_OFFLINE) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102152200.p1FM00Rq046658>