From nobody Wed May 04 22:54:40 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 176CE1AB07B7; Wed, 4 May 2022 22:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KtsbP0BMgz4kDv; Wed, 4 May 2022 22:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651704881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xw4hz6QCr4hd8RKNq22i8HcJKFLVQTu+pJDw6rt1+qg=; b=Qn1TonjsmAF5+Xab+MsMcKfbOfdayHOj4SicN4vAK/AG91LXhnI/lcagCDHLn5TXWGOudg EPonorxOk9/u0pS6YpuUBFa0mEB5HimJZ9hRMk0TlhGjySpH9Lx/Sc/pDsO+OPF8i5EZuh jykTEoMFOA1pWf9B8ilgWRWB2TrdVi+j/ChgT9BzXxv8yQj43cHh+me+WynrHwpdCdzmzw BqNWTVRpDWa1EzErwBGBsCUV5JRoocBGyUBge1tmfVxxwRVr2Te1n6a0i5my4BIud/6Mci xSf2ci8xevcsBp4+ZEPofjqZmrEbmMrd79R5y6MEUMmHSKD1tBA6dSDLxQW5vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D53F01BE26; Wed, 4 May 2022 22:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 244MseQu042123; Wed, 4 May 2022 22:54:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 244MseaX042122; Wed, 4 May 2022 22:54:40 GMT (envelope-from git) Date: Wed, 4 May 2022 22:54:40 GMT Message-Id: <202205042254.244MseaX042122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1907e1c07c36 - main - ada: Move comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1907e1c07c3616bc49309f017d24106d2773b24a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651704881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xw4hz6QCr4hd8RKNq22i8HcJKFLVQTu+pJDw6rt1+qg=; b=qkkeZ814KH+VwH1mhPGWBlTYKjNB5sQL5kcsvmpQuCjawi88FfnSnr6QQwX5dX49IUOtkY AjusTT5r2H1bHoGEqjuTdrKY7OZDimD5XeRTRDKxhYhlMZVLXRjGAchjbTvC3O/OABdyxT 0lmVYCLkePm6oQ0aOW22PHBz70euWYbvMOpL26KxC8NVIGXSjPMelm1eCPVQn1p8PSyWu1 bBr68vSBaYUhvt3+UuIi6ohn2nKcMbvSKAwSqkILGq/WeBRQCegCWOd6WaGJR3VBiRrtaQ BTERSc08JTRHY1pB4wup60VXHzultRoLn/ICmkOS7i1om4amORnV6wz3tWeytw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651704881; a=rsa-sha256; cv=none; b=GZmfex0pKa32/PS4CCBZ9hEE3M75Jo3d8I2XDcRrJYRcGfk0cHL3ARJ0UQ7ufX/O9eWhsR iE/EDkdRyEQzMqSCj567UsHRy5tc9pezrp/RzeHJmes7OPPx46yYECfluvUW0k5GNJCAge YxPBT0FCDlRnMxQrsT5MRjYbfpNdMEdsTOPpReQb8W9G3vpXMV4EhmKy5NAd3fkV++uNdb Ie6k7fsQiFoYNK4R5UyyE0UtksQw4rFWAZ9eKo6VO4JG+8Ocje2TgZx/SklJm24lgPZrpl NTBpkpp6eVxv/78JFmmYS39fIe19e44H3L6aBKjXU/R4zimYoEGo1ClgUbxhJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1907e1c07c3616bc49309f017d24106d2773b24a commit 1907e1c07c3616bc49309f017d24106d2773b24a Author: Warner Losh AuthorDate: 2022-05-04 22:53:03 +0000 Commit: Warner Losh CommitDate: 2022-05-04 22:54:38 +0000 ada: Move comment Move the comment about releasing ccb before periph to adaprobedone() where it belongs. Sponsored by: Netflix --- sys/cam/ata/ata_da.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index b76058c8f19d..aed08a8566ae 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -2691,6 +2691,12 @@ adaprobedone(struct cam_periph *periph, union ccb *ccb) softc = (struct ada_softc *)periph->softc; + /* + * Since our peripheral may be invalidated by an error we must release + * our CCB before releasing the reference on the peripheral. The + * peripheral will only go away once the last reference is removed, and + * we need it around for the CCB release operation. + */ if (ccb != NULL) xpt_release_ccb(ccb); @@ -2987,15 +2993,6 @@ adadone(struct cam_periph *periph, union ccb *done_ccb) } } - /* - * Since our peripheral may be invalidated by an error - * above or an external event, we must release our CCB - * before releasing the reference on the peripheral. - * The peripheral will only go away once the last reference - * is removed, and we need it around for the CCB release - * operation. - */ - xpt_release_ccb(done_ccb); softc->state = ADA_STATE_WCACHE; xpt_schedule(periph, priority);