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 <smfer...@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();
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to