From owner-svn-src-all@FreeBSD.ORG Wed Apr 25 06:22:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD762106564A; Wed, 25 Apr 2012 06:22:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7BAD8FC18; Wed, 25 Apr 2012 06:22:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3P6MMCY083302; Wed, 25 Apr 2012 06:22:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3P6MMf5083300; Wed, 25 Apr 2012 06:22:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204250622.q3P6MMf5083300@svn.freebsd.org> From: Alexander Motin Date: Wed, 25 Apr 2012 06:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234670 - stable/8/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 06:22:22 -0000 Author: mav Date: Wed Apr 25 06:22:22 2012 New Revision: 234670 URL: http://svn.freebsd.org/changeset/base/234670 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/8/sys/cam/ata/ata_da.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Wed Apr 25 06:18:49 2012 (r234669) +++ stable/8/sys/cam/ata/ata_da.c Wed Apr 25 06:22:22 2012 (r234670) @@ -432,17 +432,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;