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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DCA5C433E1 for ; Sat, 27 Jun 2020 07:32:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 194C42081A for ; Sat, 27 Jun 2020 07:32:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Pg+uD5yS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 194C42081A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7ACD76B0087; Sat, 27 Jun 2020 03:32:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E4D56B0089; Sat, 27 Jun 2020 03:32:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 588A56B008A; Sat, 27 Jun 2020 03:32:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0206.hostedemail.com [216.40.44.206]) by kanga.kvack.org (Postfix) with ESMTP id DDAD46B0089 for ; Sat, 27 Jun 2020 03:32:50 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D60581EF1 for ; Sat, 27 Jun 2020 07:32:49 +0000 (UTC) X-FDA: 76974174858.06.frame99_021292826e5c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id AA468100404E9 for ; Sat, 27 Jun 2020 07:32:49 +0000 (UTC) X-HE-Tag: frame99_021292826e5c X-Filterd-Recvd-Size: 3021 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Sat, 27 Jun 2020 07:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=nSd3C/DSNsC2O/2jsqExpsnu1gd7FF5TZdmvZuWRNPs=; b=Pg+uD5ySHobKze+G3z72vgMqje I3LI6dZfO3nOCLTW9PT7d6ugzTiNDCEtNY0mB8yeFck0uVAD2NK5kK59O4flLxaLCnECUhOYCji/N 23QiHSqYjFn0jgYdIdjxCpjH5iZhuxzwRMC4wcK+4Twctub06mZx70N39Cbqk/hfMBAkUlPxfTQ2g 31pSU1TgdBefiv2HiZm9UGCDAiZyPFWA+BRsBAHsiC++udMAeoOwBhV/B6DEPUDWSu+2pKW9N+h9T 9oxhhPsi7vxIWB8qxOh9/U4FNAjdd0QkyaliIKRQ+QJF/o7aLfD7PoAqxpk6jCQ1OXTSVMnAoGcrS q7oYemlA==; Received: from [2001:4bb8:184:76e3:595:ba65:ae56:65a6] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jp5KD-0006nj-M4; Sat, 27 Jun 2020 07:32:35 +0000 From: Christoph Hellwig To: Jens Axboe , Tejun Heo Cc: Dennis Zhou , Li Zefan , Johannes Weiner , dm-devel@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 10/14] blk-cgroup: remove the !bio->bi_blkg check in blkcg_bio_issue_check Date: Sat, 27 Jun 2020 09:31:55 +0200 Message-Id: <20200627073159.2447325-11-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200627073159.2447325-1-hch@lst.de> References: <20200627073159.2447325-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Queue-Id: AA468100404E9 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This is purely a sanity check for grave programming errors. Remove it to simplify further work in this area. Signed-off-by: Christoph Hellwig --- include/linux/blk-cgroup.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index 60df97202314c7..8e86b598316c10 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h @@ -543,24 +543,11 @@ static inline void blkcg_bio_issue_init(struct bio = *bio) static inline bool blkcg_bio_issue_check(struct request_queue *q, struct bio *bio) { - struct blkcg_gq *blkg; + struct blkcg_gq *blkg =3D bio->bi_blkg; bool throtl =3D false; =20 rcu_read_lock(); - - if (!bio->bi_blkg) { - char b[BDEVNAME_SIZE]; - - WARN_ONCE(1, - "no blkg associated for bio on block-device: %s\n", - bio_devname(bio, b)); - bio_associate_blkg(bio); - } - - blkg =3D bio->bi_blkg; - throtl =3D blk_throtl_bio(q, blkg, bio); - if (!throtl) { struct blkg_iostat_set *bis; int rwd, cpu; --=20 2.26.2