Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Oct 2014 06:14:51 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r272977 - stable/10/sys/cam
Message-ID:  <201410120614.s9C6EpCT047134@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sun Oct 12 06:14:50 2014
New Revision: 272977
URL: https://svnweb.freebsd.org/changeset/base/272977

Log:
  Use proper variable when looping through periphs with CAM_PERIPH_FREE.
  
  PR:		194256
  Submitted by:	Scott M. Ferris <smferris@gmail.com>
  Sponsored by:	EMC/Isilon Storage Division

Modified:
  stable/10/sys/cam/cam_xpt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/cam_xpt.c
==============================================================================
--- stable/10/sys/cam/cam_xpt.c	Sun Oct 12 02:42:36 2014	(r272976)
+++ stable/10/sys/cam/cam_xpt.c	Sun Oct 12 06:14:50 2014	(r272977)
@@ -2199,7 +2199,7 @@ xptperiphtraverse(struct cam_ed *device,
 		next_periph = SLIST_NEXT(periph, periph_links);
 		while (next_periph != NULL &&
 		    (next_periph->flags & CAM_PERIPH_FREE) != 0)
-			next_periph = SLIST_NEXT(periph, periph_links);
+			next_periph = SLIST_NEXT(next_periph, periph_links);
 		if (next_periph)
 			next_periph->refcount++;
 		mtx_unlock(&bus->eb_mtx);
@@ -2273,7 +2273,7 @@ xptpdperiphtraverse(struct periph_driver
 		next_periph = TAILQ_NEXT(periph, unit_links);
 		while (next_periph != NULL &&
 		    (next_periph->flags & CAM_PERIPH_FREE) != 0)
-			next_periph = TAILQ_NEXT(periph, unit_links);
+			next_periph = TAILQ_NEXT(next_periph, unit_links);
 		if (next_periph)
 			next_periph->refcount++;
 		xpt_unlock_buses();



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