svn commit: r237640 - stable/8/sys/cam

Alexander Motin mav at FreeBSD.org
Wed Jun 27 11:08:04 UTC 2012


Author: mav
Date: Wed Jun 27 11:08:03 2012
New Revision: 237640
URL: http://svn.freebsd.org/changeset/base/237640

Log:
  MFC r237401:
  Make cam_periph_hold() behavior consistent: drop taken reference and
  return ENXIO if periph was invalidated while we were waiting for it.

Modified:
  stable/8/sys/cam/cam_periph.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/cam/cam_periph.c
==============================================================================
--- stable/8/sys/cam/cam_periph.c	Wed Jun 27 11:07:01 2012	(r237639)
+++ stable/8/sys/cam/cam_periph.c	Wed Jun 27 11:08:03 2012	(r237640)
@@ -390,6 +390,10 @@ cam_periph_hold(struct cam_periph *perip
 			cam_periph_release_locked(periph);
 			return (error);
 		}
+		if (periph->flags & CAM_PERIPH_INVALID) {
+			cam_periph_release_locked(periph);
+			return (ENXIO);
+		}
 	}
 
 	periph->flags |= CAM_PERIPH_LOCKED;


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