Author: mav
Date: Wed Apr 18 08:55:26 2012
New Revision: 234414
URL: http://svn.freebsd.org/changeset/base/234414

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

Modified:
  head/sys/cam/ata/ata_da.c

Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c   Wed Apr 18 08:15:55 2012        (r234413)
+++ head/sys/cam/ata/ata_da.c   Wed Apr 18 08:55:26 2012        (r234414)
@@ -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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to