Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1188244ybt; Sat, 27 Jun 2020 00:34:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxPCB8pTlTxsmpbbIFi7ramFUNdg8x0jDTX/f3ng7Z39TSiiuuLji+jkysJMyK/Z1TaY1+ X-Received: by 2002:a17:906:97d7:: with SMTP id ef23mr5811095ejb.450.1593243249637; Sat, 27 Jun 2020 00:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593243249; cv=none; d=google.com; s=arc-20160816; b=UK2Y/9jekwSwog7qbszJQg1CApcERhVo8ispw3zLClR7wiuS6hAsgSrgm3i1f62uBh /G1DBIeTVAbcZM+m6ufg8ORL50OjT2H0j/GlVg4lkoxxjuaDNKoh2h7+1jU843PouXZn tnJoB45piVyfLnPTg1eGeVyEUXhMtW7E08E83Rdtjhc41b89aMOfloxG3Pb80ZBwWjE+ AGwE5sDE4vLQ4ujmN+rscLnNGk+JU39ef7Qr/RuLyToJTZu2FK77o4BE/oA3EqscaNny T5vVe5ym/FRLTwbqA1HrX5sWvlU+GEXoR1/DmB8MhMcW5mA+c1lM5TLeGWfPqYR0ZFvY YGmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nSd3C/DSNsC2O/2jsqExpsnu1gd7FF5TZdmvZuWRNPs=; b=YqTCFYxdoAY5GYoEq6AP4XCkiQwHgqhO+VjLKmBkzGjegiQsQgTbZOHTjOfN8zniux Xo9yApMDI4jl/Xx8HJKGwq+GkzQpUja/mGGNJ38eLSAziRIuS1v8TGZQnx5o2SdBiv0Q sgLsqQBQQPxVEfGUSyDwRwt/74gWdBJ5rQScEwAxaVutmTJm9DJ5yTUEWu/VRFWBgX+l IadMsTWPi+wHbRDuW2o+rO37/Vm/mYHk82sAERKe81l5//TmueqrMJn2J2n6EzTd4Q4V fOihKUg1ELhxC5v7w6x3VQUy+xA0KNp/7N6s0sDa3A41glQqC1XSpGD1raYI4y5KlrOc TlMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Pg+uD5yS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si12624474edl.120.2020.06.27.00.33.47; Sat, 27 Jun 2020 00:34:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Pg+uD5yS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726524AbgF0HdA (ORCPT + 99 others); Sat, 27 Jun 2020 03:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbgF0Hc7 (ORCPT ); Sat, 27 Jun 2020 03:32:59 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E7A3C03E979; Sat, 27 Jun 2020 00:32:59 -0700 (PDT) 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 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = bio->bi_blkg; bool throtl = false; 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 = bio->bi_blkg; - throtl = blk_throtl_bio(q, blkg, bio); - if (!throtl) { struct blkg_iostat_set *bis; int rwd, cpu; -- 2.26.2