Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2012 06:18:50 +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-9@freebsd.org
Subject:   svn commit: r234669 - stable/9/sys/cam/ata
Message-ID:  <201204250618.q3P6IoXW083131@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Apr 25 06:18:49 2012
New Revision: 234669
URL: http://svn.freebsd.org/changeset/base/234669

Log:
  MFC r234414:
  Alike to SCSI make adaclose() to not return error if device gone.
  This fixes KASSERT panic inside GEOM if kernel built with INVARIANTS.

Modified:
  stable/9/sys/cam/ata/ata_da.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cam/ata/ata_da.c
==============================================================================
--- stable/9/sys/cam/ata/ata_da.c	Wed Apr 25 04:57:29 2012	(r234668)
+++ stable/9/sys/cam/ata/ata_da.c	Wed Apr 25 06:18:49 2012	(r234669)
@@ -456,17 +456,16 @@ adaclose(struct disk *dp)
 	struct	cam_periph *periph;
 	struct	ada_softc *softc;
 	union ccb *ccb;
-	int error;
 
 	periph = (struct cam_periph *)dp->d_drv1;
 	if (periph == NULL)
 		return (ENXIO);	
 
 	cam_periph_lock(periph);
-	if ((error = cam_periph_hold(periph, PRIBIO)) != 0) {
+	if (cam_periph_hold(periph, PRIBIO) != 0) {
 		cam_periph_unlock(periph);
 		cam_periph_release(periph);
-		return (error);
+		return (0);
 	}
 
 	softc = (struct ada_softc *)periph->softc;



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