svn commit: r331008 - head/sys/dev/md

Brooks Davis brooks at FreeBSD.org
Thu Mar 15 16:37:44 UTC 2018


Author: brooks
Date: Thu Mar 15 16:37:43 2018
New Revision: 331008
URL: https://svnweb.freebsd.org/changeset/base/331008

Log:
  Restore the behavior of returning the total number of units by
  unconditionally incrementing i in the loop;
  
  Reported by:	cem
  MFC with:	r330880
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D14685

Modified:
  head/sys/dev/md/md.c

Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c	Thu Mar 15 16:17:02 2018	(r331007)
+++ head/sys/dev/md/md.c	Thu Mar 15 16:37:43 2018	(r331008)
@@ -1765,7 +1765,8 @@ err_after_new:
 		i = 1;
 		LIST_FOREACH(sc, &md_softc_list, list) {
 			if (i < MDNPAD - 1)
-				mdio->md_pad[i++] = sc->unit;
+				mdio->md_pad[i] = sc->unit;
+			i++;
 		}
 		mdio->md_pad[MIN(i, MDNPAD - 1)] = -1;
 		mdio->md_pad[0] = i - 1;


More information about the svn-src-head mailing list