From patchwork Wed Apr 20 04:27:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12819738 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6EDCC433EF for ; Wed, 20 Apr 2022 04:28:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8222A6B0088; Wed, 20 Apr 2022 00:28:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 783BD6B0089; Wed, 20 Apr 2022 00:28:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 627D46B008A; Wed, 20 Apr 2022 00:28:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 4A0726B0088 for ; Wed, 20 Apr 2022 00:28:03 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 201456291E for ; Wed, 20 Apr 2022 04:28:03 +0000 (UTC) X-FDA: 79375974846.06.F32BD3D Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf16.hostedemail.com (Postfix) with ESMTP id EA888180006 for ; Wed, 20 Apr 2022 04:28:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=lCOBvABRVXqvoK7YjkTVz0nyOLl8eIMjcntmO1hcFBU=; b=GZMUjFSY7N17YDxVy5vCXFC8DI iO7ufwCQBhEzzmAA16IH5fKaUdj7MzC9pssyigjBN6zc4QeGjVp2cC0+oKW0ngBKJUmwwfrnOJLez kVwFW6riBd2KDqqmrn5na8NftMQ8V/aDFJoDGmQ8oaQImJcCqC9IpvsmBzVRcif6mj9jDEyJR6Dnr 8ZETYU53611Z2h3wRXH7LsIwvn+BakoMFNb6O20luyRapaDtDEe4qaVIGZkY1Fm9rnk9gwEQU4mTv 3wrFnLN1cVNUrZWxDHVu3EjRcUgZVbJJcIk15tAQwR7nv+O2jxOZzcO0PDV91hcb+vRgppcqEKbM2 qqVUXUsA==; Received: from 089144220023.atnat0029.highway.webapn.at ([89.144.220.23] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh1wc-007FVC-8s; Wed, 20 Apr 2022 04:27:58 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Paolo Valente , Tejun Heo , James Smart , Dick Kennedy , linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-nvme@lists.infradead.org, linux-mm@kvack.org Subject: [PATCH 10/15] blk-cgroup: remove pointless CONFIG_BLOCK ifdefs Date: Wed, 20 Apr 2022 06:27:18 +0200 Message-Id: <20220420042723.1010598-11-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220420042723.1010598-1-hch@lst.de> References: <20220420042723.1010598-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=GZMUjFSY; dmarc=none; spf=none (imf16.hostedemail.com: domain of BATV+4b42fcde86a6810335df+6814+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+4b42fcde86a6810335df+6814+infradead.org+hch@bombadil.srs.infradead.org X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: EA888180006 X-Stat-Signature: 6k1cym3o6kpsz1pu5kfx8t1uh4hcto4r X-HE-Tag: 1650428881-132669 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: No need to make BLK_CGROUP stubs conditional on CONFIG_BLOCK as they can't be used without that. Signed-off-by: Christoph Hellwig --- block/blk-cgroup.h | 3 --- include/linux/blk-cgroup.h | 4 ---- 2 files changed, 7 deletions(-) diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 03405ddf2a7ba..a948f4eb0bff8 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h @@ -525,8 +525,6 @@ struct blkcg_policy { struct blkcg { }; -#ifdef CONFIG_BLOCK - static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, void *key) { return NULL; } static inline struct blkcg_gq *blk_queue_root_blkg(struct request_queue *q) { return NULL; } @@ -554,7 +552,6 @@ static inline bool blk_cgroup_mergeable(struct request *rq, struct bio *bio) { r #define blk_queue_for_each_rl(rl, q) \ for ((rl) = &(q)->root_rl; (rl); (rl) = NULL) -#endif /* CONFIG_BLOCK */ #endif /* CONFIG_BLK_CGROUP */ #endif /* _BLK_CGROUP_PRIVATE_H */ diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index 97c7968e32040..abbfa97d6d46f 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h @@ -44,15 +44,11 @@ struct cgroup_subsys_state *bio_blkcg_css(struct bio *bio); static inline void blkcg_maybe_throttle_current(void) { } static inline bool blk_cgroup_congested(void) { return false; } - -#ifdef CONFIG_BLOCK static inline void blkcg_schedule_throttle(struct request_queue *q, bool use_memdelay) { } static inline struct cgroup_subsys_state *bio_blkcg_css(struct bio *bio) { return NULL; } -#endif /* CONFIG_BLOCK */ - #endif /* CONFIG_BLK_CGROUP */ int blkcg_set_fc_appid(char *app_id, u64 cgrp_id, size_t app_id_len);