From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 820A4C433F5 for ; Mon, 11 Apr 2022 17:34:07 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-317-LyU8BnAROJCATUnrfWFEHg-1; Mon, 11 Apr 2022 13:34:05 -0400 X-MC-Unique: LyU8BnAROJCATUnrfWFEHg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C1F8886B8A0; Mon, 11 Apr 2022 17:34:03 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67CC8C15D67; Mon, 11 Apr 2022 17:34:03 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 30EF81947BBD; Mon, 11 Apr 2022 17:34:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D661619466DF for ; Mon, 11 Apr 2022 17:34:01 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C434740BB05; Mon, 11 Apr 2022 17:34:01 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C09D540BAE6 for ; Mon, 11 Apr 2022 17:34:01 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A56A386B8A0 for ; Mon, 11 Apr 2022 17:34:01 +0000 (UTC) Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-617-w0cpRzqzPZyMyvERoXsxzw-1; Mon, 11 Apr 2022 13:34:00 -0400 X-MC-Unique: w0cpRzqzPZyMyvERoXsxzw-1 Received: by mail-qv1-f44.google.com with SMTP id b17so13782064qvf.12 for ; Mon, 11 Apr 2022 10:34:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WDwpjxnaXnMZ7L/oCeYRvVxrGJTCBqxpXVhzEXP2jxw=; b=egyJAzK5DUjFeA/ay4MjlwKtwO7+69qo5gloBnBuTL6fbS3kmBb9DW8DxNEsBnes73 HykQunjs6cm6XDbho5bFtyHGhAQZvrt/075Wfwr62NNSRJUZMmk+kxyWxPwTSxYN5mEW C0cGcovlEzBA7fBGTkueiVNuDB13fd3IKerHnw1KND03NUIVu8Fi+jx9OpMMu0FU7IPD x0HbCiVN8M5qTR3I3n2bbDxlPvKZjtYKaFQWCWx3Nxd3u3KqW+YaPiNLGpbp6WrlAAE/ Yei9CR95j91t7WxG7LRwODsQUw45rGpt6ASspVAbGe3w1Gz9sIHHOxeheMAby5aKmWWt N2EQ== X-Gm-Message-State: AOAM533Re4LM8Ix5YFDahcWxm6QDlBWsAwWbb3ryGwbPimqOh2dOoGg+ f0/AJUCaVoupV9HS0a8UcTBw+V0= X-Google-Smtp-Source: ABdhPJzYSYJVHqSt6oh9OPhZ8i6wED3jCrcze23zl3ItN1H0Y8TdIYC5OdPbTvUi+Ft4gwKM5nxVyQ== X-Received: by 2002:a05:6214:daa:b0:441:7161:de4b with SMTP id h10-20020a0562140daa00b004417161de4bmr27795121qvh.48.1649698439658; Mon, 11 Apr 2022 10:33:59 -0700 (PDT) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id z145-20020a376597000000b0069c0669327bsm4313551qkb.95.2022.04.11.10.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 10:33:59 -0700 (PDT) Date: Mon, 11 Apr 2022 13:33:58 -0400 From: Mike Snitzer To: linux-block@vger.kernel.org Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Subject: [dm-devel] [PATCH] block: remove redundant blk-cgroup init from __bio_clone X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christoph Hellwig , Dennis Zhou , tj@kernel.org, axboe@kernel.dk, dm-devel@redhat.com Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit When bio_{alloc,init}_clone are passed a bdev, bio_init() will call bio_associate_blkg() so the __bio_clone() work to initialize blkcg isn't needed. Signed-off-by: Mike Snitzer --- block/bio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/bio.c b/block/bio.c index 7892f1108ca6..6980f1b4b0f4 100644 --- a/block/bio.c +++ b/block/bio.c @@ -778,9 +778,6 @@ static int __bio_clone(struct bio *bio, struct bio *bio_src, gfp_t gfp) bio->bi_ioprio = bio_src->bi_ioprio; bio->bi_iter = bio_src->bi_iter; - bio_clone_blkg_association(bio, bio_src); - blkcg_bio_issue_init(bio); - if (bio_crypt_clone(bio, bio_src, gfp) < 0) return -ENOMEM; if (bio_integrity(bio_src) && -- 2.30.0 -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D316C433EF for ; Mon, 11 Apr 2022 17:34:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343834AbiDKRgQ (ORCPT ); Mon, 11 Apr 2022 13:36:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243127AbiDKRgP (ORCPT ); Mon, 11 Apr 2022 13:36:15 -0400 Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD1BA165A7 for ; Mon, 11 Apr 2022 10:34:00 -0700 (PDT) Received: by mail-qv1-f48.google.com with SMTP id kl29so13802818qvb.2 for ; Mon, 11 Apr 2022 10:34:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WDwpjxnaXnMZ7L/oCeYRvVxrGJTCBqxpXVhzEXP2jxw=; b=RSxbr8wc1dSGrhQC8nmqxyaytvYTKzzUgbjMTlntOskzHQ0Ei1C0VnJ/O5oEkJlCvA AwQzJTuFa0NRyZQWBZJebyUbV/XzotbEQfV4uOJ7FajUZAECCTvrbF+MtSByK2ClRjb5 RNUeKYbe6D0AcDTGX+kAQbp0LS6fXsHujTfioRfkadrsajypx9Pj3NeK/UNohz+pxS4S ZwnboesemBtayVVe6yfv/bU9T5/lwzDXIdkYoFn5v4c2IfEjTeEzikC14P29/c8pEyMU iOytHNFc9r/BIFvHGNXHC68/yaaYsGQXhuMyoNho+FEpC0HlyC7WNzea3aPHfeD7iXxA Yg9g== X-Gm-Message-State: AOAM530WP0gFJISIETEtOtFXrwf2GnqlwfPy+XBPn+x88UeRQM/Ga2lH 5AakHXsU4wxps8tYk7sAqXCcVqCjeeYTpdoBuj9OyTotAsQLS6Jnj7O56QPT8S6jQjJqC6JsfHK bGDQ8A/3R4o0z3oXXILSjU96IeM8Oh3QegxvGqpzwpNhWdSTyYhQ87z3di2okD7YTm2+yFbonjr 8= X-Google-Smtp-Source: ABdhPJzYSYJVHqSt6oh9OPhZ8i6wED3jCrcze23zl3ItN1H0Y8TdIYC5OdPbTvUi+Ft4gwKM5nxVyQ== X-Received: by 2002:a05:6214:daa:b0:441:7161:de4b with SMTP id h10-20020a0562140daa00b004417161de4bmr27795121qvh.48.1649698439658; Mon, 11 Apr 2022 10:33:59 -0700 (PDT) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id z145-20020a376597000000b0069c0669327bsm4313551qkb.95.2022.04.11.10.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 10:33:59 -0700 (PDT) Date: Mon, 11 Apr 2022 13:33:58 -0400 From: Mike Snitzer To: linux-block@vger.kernel.org Cc: Christoph Hellwig , Dennis Zhou , tj@kernel.org, axboe@kernel.dk, dm-devel@redhat.com Subject: [PATCH] block: remove redundant blk-cgroup init from __bio_clone Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org When bio_{alloc,init}_clone are passed a bdev, bio_init() will call bio_associate_blkg() so the __bio_clone() work to initialize blkcg isn't needed. Signed-off-by: Mike Snitzer --- block/bio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/bio.c b/block/bio.c index 7892f1108ca6..6980f1b4b0f4 100644 --- a/block/bio.c +++ b/block/bio.c @@ -778,9 +778,6 @@ static int __bio_clone(struct bio *bio, struct bio *bio_src, gfp_t gfp) bio->bi_ioprio = bio_src->bi_ioprio; bio->bi_iter = bio_src->bi_iter; - bio_clone_blkg_association(bio, bio_src); - blkcg_bio_issue_init(bio); - if (bio_crypt_clone(bio, bio_src, gfp) < 0) return -ENOMEM; if (bio_integrity(bio_src) && -- 2.30.0