From owner-svn-src-all@FreeBSD.ORG Tue Nov 25 06:11:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 128237CE; Tue, 25 Nov 2014 06:11:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9BA313C; Tue, 25 Nov 2014 06:11:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAP6B6Kl052750; Tue, 25 Nov 2014 06:11:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAP6B6cj052746; Tue, 25 Nov 2014 06:11:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411250611.sAP6B6cj052746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 25 Nov 2014 06:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275009 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Tue, 25 Nov 2014 06:11:07 -0000 Author: mav Date: Tue Nov 25 06:11:05 2014 New Revision: 275009 URL: https://svnweb.freebsd.org/changeset/base/275009 Log: Use ctl_set_success() instead of direct inlining. MFC after: 1 week Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_ramdisk.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Nov 25 05:57:12 2014 (r275008) +++ head/sys/cam/ctl/ctl.c Tue Nov 25 06:11:05 2014 (r275009) @@ -5211,8 +5211,7 @@ ctl_scsi_release(struct ctl_scsiio *ctsi mtx_unlock(&lun->lun_lock); - ctsio->scsi_status = SCSI_STATUS_OK; - ctsio->io_hdr.status = CTL_SUCCESS; + ctl_set_success(ctsio); if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) { free(ctsio->kern_data_ptr, M_CTL); @@ -5299,8 +5298,7 @@ ctl_scsi_reserve(struct ctl_scsiio *ctsi lun->flags |= CTL_LUN_RESERVED; lun->res_idx = residx; - ctsio->scsi_status = SCSI_STATUS_OK; - ctsio->io_hdr.status = CTL_SUCCESS; + ctl_set_success(ctsio); bailout: mtx_unlock(&lun->lun_lock); @@ -5610,8 +5608,7 @@ ctl_format(struct ctl_scsiio *ctsio) lun->flags &= ~CTL_LUN_INOPERABLE; mtx_unlock(&lun->lun_lock); - ctsio->scsi_status = SCSI_STATUS_OK; - ctsio->io_hdr.status = CTL_SUCCESS; + ctl_set_success(ctsio); bailout: if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) { @@ -9600,9 +9597,7 @@ ctl_tur(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_tur\n")); - ctsio->scsi_status = SCSI_STATUS_OK; - ctsio->io_hdr.status = CTL_SUCCESS; - + ctl_set_success(ctsio); ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Nov 25 05:57:12 2014 (r275008) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Nov 25 06:11:05 2014 (r275009) @@ -250,7 +250,7 @@ ctl_backend_ramdisk_move_done(union ctl_ &be_lun->io_task); return (0); } - io->io_hdr.status = CTL_SUCCESS; + ctl_set_success(&io->scsiio); } else if ((io->io_hdr.port_status != 0) && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)){