From nobody Thu Nov 14 18:12:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1629794981; cv=pass; d=zohomail.com; s=zohoarc; b=RDxJhBXv82GmxQKGTbDKwslY6Ig8LC4JpLT2zwcAP9wd4ZfRNsTL8ikgegB1M9KPCW5J1nU7AdmBomet2HMJrHG7g2nvpPDiqliR3/ZLQMip+txvgeFCCxNND5h6o/j7ZFueJCW6jOMFWuXIDsgzQZMuleiCy/SBfJudiNXBSvM= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629794981; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1N2uiVLFU5ZMtznDXUsWnweG+NBu3A9QkTphI8xiDcg=; b=cqfpfycRRrpnxbgT6tSZ6t5cineDgOhqcIiLUqiE/T3aExy8NpDrs0axi77XsrLhh+LeQ7p8h7l8FzEG1EU2/K8hkr/EedzIDOQBwxWTrgoeO/rizGOUaa22+Ekh42f+0RJir3IBKD6C51SR40IFuEFfYHsox1E15h6NsiakrnM= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=1 dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1629794981696175.3738012815278; Tue, 24 Aug 2021 01:49:41 -0700 (PDT) Received: from localhost ([::1]:53418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIS7o-0007nw-NO for importer@patchew.org; Tue, 24 Aug 2021 04:49:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIRyK-0002ku-Rr; Tue, 24 Aug 2021 04:39:52 -0400 Received: from mail-eopbgr70101.outbound.protection.outlook.com ([40.107.7.101]:20612 helo=EUR04-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIRyI-0007OJ-41; Tue, 24 Aug 2021 04:39:52 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM5PR0801MB1780.eurprd08.prod.outlook.com (2603:10a6:203:39::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19; Tue, 24 Aug 2021 08:39:32 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::3c5e:7829:362d:1423]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::3c5e:7829:362d:1423%2]) with mapi id 15.20.4436.025; Tue, 24 Aug 2021 08:39:32 +0000 Received: from localhost.localdomain (185.215.60.249) by HE1PR05CA0178.eurprd05.prod.outlook.com (2603:10a6:3:f8::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Tue, 24 Aug 2021 08:39:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UP2tTsMG6D/bUZkOs/QN48KuZoO6+yjcuHYaGBx2QmWi+e/q6q4b8OhJe20PTiiak62HXPENh+4v3CtdD4PNRiSF5uavDg8Y/eZZJ4CzpG4MNHp+rDAk4E+M57nosTX0HmUmB+Z0Xi/kgC6I2P9QSdlUfPpMVOWLvU5JFIyZ3zl6pgrrQ2kLHG/8Y8vgpmfB5/uNgz9JklqkMChgfCsD9SRK/TJtcDwT39IfNPxT+1CZWNQBbVHzCD55BHfQWby/Y6J8YU5SOUVbmpSYXL8oDpR5Irz6B3x+zYsot7QnX1UBfckOcK4Z9tKub0ig6zQZXBiYBTUixcuQJI1LVUf8Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1N2uiVLFU5ZMtznDXUsWnweG+NBu3A9QkTphI8xiDcg=; b=in7bcr4TwYtjMJXJMWa0WhQTzjcC5narGHuN3YBEj53JVwzgMDPDza8tKMqcsHGA2OV4dYLi+iMuTthDm7OrMdiyhpYHMoOMyzQyOiUowuRa40J8OlHzLfEZT4gpgjGty2OogEfYLOTsxbS3/hIzCWnNiF87itjNojB92EtuOEliMSwxbToNVSuM4iPgoxR5QNJJkkZaOobe5ICPx1iCpkHNikIi1+bVFP2hcvASanrbvHSqmhs+s+KdNJ10jnvb41Q++4nGya8ZWIYmChx/yXhwxvlCDR2n4A6S/1nDG2FaUBqjNlU9nE8Bw696Bza/4yo3ZDM/fXiSZT7oDi+Whg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1N2uiVLFU5ZMtznDXUsWnweG+NBu3A9QkTphI8xiDcg=; b=OJzSVlK+3goGihXVBjuz5RqwcSc1brO4FVbRZi61eCHttFgXeN+pLtTaclJbbV/h28JP0cK+n0ZIecVTwyIkgFqRwiSt3jSXDlXPxb60YfQ51KzW0/xgJeqj3++5bQ3m1iraFRNMB/1Sz6oXzftR0qTy1OEj6RsTMjBdlQdm8xM= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, eblake@redhat.com, armbru@redhat.com, crosa@redhat.com, ehabkost@redhat.com, berrange@redhat.com, pbonzini@redhat.com, vsementsov@virtuozzo.com, jsnow@redhat.com, hreitz@redhat.com, kwolf@redhat.com, Max Reitz Subject: [PATCH v8 11/34] block/copy-before-write: drop extra bdrv_unref on failure path Date: Tue, 24 Aug 2021 11:38:33 +0300 Message-Id: <20210824083856.17408-12-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210824083856.17408-1-vsementsov@virtuozzo.com> References: <20210824083856.17408-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: HE1PR05CA0178.eurprd05.prod.outlook.com (2603:10a6:3:f8::26) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4d268a4-f200-4534-09e1-08d966dab20d X-MS-TrafficTypeDiagnostic: AM5PR0801MB1780: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:243; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AJkDn2KL6LCB9SSsD1xDxpkp5PORitfuX+eGrw450FB5xaXNzoivCZ41NDx8vRyHbi+rTLZR50bxg9XFYlpwCetu+fX72/pdB6qcjU6E/3Xyq5yJH8a98xR8YzIhyHgDPf2EXXjdcyyGi25iNeekJHzp4I/SubMtshtlsRu3YDma0+xQnXBLoiqCyYyceOIaGbpOflU59kR672BgcEiUDBSsgaHSQK3//uwuT3egQOzDeVevgCeAHT0nZ/Wx95ez5GEOUGmsUmAnZLRM0vcOuWP5G5iVgkK7mJveze/Rf9CyXr/zYgv4xfXjBYNDzyQLGT47PkIRWdLfZhaJxcPkS82n6i1pz+0tOOJ438rVFVMjxGvgp3f2a6Ym0BY+FgAFdPyXSk+OGiwcD7xjdsJ3l+UxxYFepjY8qkhWWbE4tNRM0BpXrbSjgEI9ZvabTJM6T3VblloHIsjuPfDssXDNwAMUxbwvzAmNAp2nKpn9YOAIn4PlaBjs0Of4jPuO0t3RHDVZA0igsWEfz33Edj75PZsFklsQSl7j4LMPCy1r544aKUrz8iRCa6tu3tGi52wPZcdhQSwldEXBvPSbOoGqOtaduiTIYfuuoKHvfeSjFfSD4+G3zbvDtRM6XhMlMA/qkV5v6ea24JjH+vVdCYwTBRDA+fB+lQ1/Icyu8RyGpdWYTD/nQ/d1V34KF34xy53ONfMeEyJ4gNEhxSqL0gNMcA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39840400004)(376002)(346002)(366004)(396003)(6512007)(83380400001)(4744005)(4326008)(66556008)(66476007)(186003)(86362001)(38100700002)(38350700002)(36756003)(316002)(7416002)(478600001)(1076003)(52116002)(8676002)(2906002)(26005)(66946007)(2616005)(956004)(5660300002)(6486002)(6916009)(6506007)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?tSKrk1Q0M+DR/TXiFRhmUxZTwLUe9dSL5fRx38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?R6IQ0tQOXEtlhW8XLtquVkqNE7mlDF0sO2E4/z7uuWv+nPaeEeg4595BMNyp?= =?us-ascii?Q?AZZfJnaTeIaRvrlS5NVUzD54OKSDABkNQt/ytghxl6iuEpi5PSO+YkSkBK61?= =?us-ascii?Q?qxAKW0h+PVOeFTcTdXbPcUz+t4B1MnSHcCavcy4cE8Gxxe53FLFGy1ILYsZ9?= =?us-ascii?Q?jt9Ca9X65C0T6XzEiPgEbJXs7zc+fgUyS0U8GM7Gdmhyz1FlECYVhhVBOs8n?= =?us-ascii?Q?gqL/HiI9sfVePK/yJGDo+SXwjoEtTqBKcgIOxoryXPCR8MUvhBqHHTN28tBy?= =?us-ascii?Q?e2j39UQm+zn0bk5wsl3lA+6gxkMrmvENkX6554K2OaMLRo10Exgc45c20E9i?= =?us-ascii?Q?husXJkmSUBg5lA0nEwiRRxWfp57IU/+x479MB2yB53ySB+qUJUKki2w6pGMJ?= =?us-ascii?Q?LF3+QgKlS+xZM6VkYbQcGHaD?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4d268a4-f200-4534-09e1-08d966dab20d X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2021 08:39:32.7092 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /HfGIjUYgdiC+01+YK/xepmSI2O+PSVFR9Sp9OxLDaD9T4LyR/M7newSXUtQ/kfgWc03nooeseJp4V1uc7Z3uhBRI/xxRLZ7lRYtYIAi4hA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1780 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=40.107.7.101; envelope-from=vsementsov@virtuozzo.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) X-ZM-MESSAGEID: 1629794983341100003 Content-Type: text/plain; charset="utf-8" bdrv_attach_child() do bdrv_unref() on failure, so we shouldn't do it by hand here. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/copy-before-write.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/copy-before-write.c b/block/copy-before-write.c index 2a51cc64e4..945d9340f4 100644 --- a/block/copy-before-write.c +++ b/block/copy-before-write.c @@ -201,7 +201,6 @@ BlockDriverState *bdrv_cbw_append(BlockDriverState *sou= rce, state->target =3D bdrv_attach_child(top, target, "target", &child_of_b= ds, BDRV_CHILD_DATA, errp); if (!state->target) { - bdrv_unref(target); bdrv_unref(top); return NULL; } --=20 2.29.2