From patchwork Wed Apr 20 04:27:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12819729 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 09092C4321E for ; Wed, 20 Apr 2022 04:27:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 69BFD6B0072; Wed, 20 Apr 2022 00:27:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5DF596B007D; Wed, 20 Apr 2022 00:27:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4023E6B0073; Wed, 20 Apr 2022 00:27:38 -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 2939F6B0072 for ; Wed, 20 Apr 2022 00:27:38 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id D989C6295A for ; Wed, 20 Apr 2022 04:27:37 +0000 (UTC) X-FDA: 79375973754.23.B28C826 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf20.hostedemail.com (Postfix) with ESMTP id A829E1C0013 for ; Wed, 20 Apr 2022 04:27:36 +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=pUx9E4bSsgTtsaDMfSE5EDajyzAF5/fHK6uAh8Ed1Gg=; b=uNkgsxELSTCE2JMXfgQQtkD9MY B+72ptZYalj2Ob23DD2ORCU3vyCOzMbIg92e+4bEh0R4/5UFv9FTP2dMABwokzQtJIESrN/DyxAhF HB2rocYfwAd0fy79eQUjfVuIkodyaZdYUp+frZc1JYy+8QNxfDFTcEKX9Sc2Lp6lkTMgNGhyDsRCJ vGDckqqRt/ngcyFA+VKNCrK3q1PpnwLRaYy/ef9aFWeGbz4HzlU0eXswHCY91slT9vL6VZd9KCUkA dPwxVISwd4J/MhAXRLs9RVzSrQSQ6t4Jl7J4gWjJO8XLU+ATVcMZkxRCbh8HqRS+d7Z3wqFwTV9q/ PZSxg22w==; 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 1nh1wB-007FBc-Fy; Wed, 20 Apr 2022 04:27:31 +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 01/15] blk-cgroup: remove __bio_blkcg Date: Wed, 20 Apr 2022 06:27:09 +0200 Message-Id: <20220420042723.1010598-2-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 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: A829E1C0013 X-Stat-Signature: mmazjfngdsgaw7un5ingy3fsk7sweimk Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=uNkgsxEL; dmarc=none; spf=none (imf20.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-HE-Tag: 1650428856-319402 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: Remove the unused and deprecated __bio_blkcg helper. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo --- block/blk-cgroup.h | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 47e1e38390c96..49e88fc9cc391 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h @@ -139,27 +139,6 @@ static inline struct cgroup_subsys_state *blkcg_css(void) return task_css(current, io_cgrp_id); } -/** - * __bio_blkcg - internal, inconsistent version to get blkcg - * - * DO NOT USE. - * This function is inconsistent and consequently is dangerous to use. The - * first part of the function returns a blkcg where a reference is owned by the - * bio. This means it does not need to be rcu protected as it cannot go away - * with the bio owning a reference to it. However, the latter potentially gets - * it from task_css(). This can race against task migration and the cgroup - * dying. It is also semantically different as it must be called rcu protected - * and is susceptible to failure when trying to get a reference to it. - * Therefore, it is not ok to assume that *_get() will always succeed on the - * blkcg returned here. - */ -static inline struct blkcg *__bio_blkcg(struct bio *bio) -{ - if (bio && bio->bi_blkg) - return bio->bi_blkg->blkcg; - return css_to_blkcg(blkcg_css()); -} - /** * bio_issue_as_root_blkg - see if this bio needs to be issued as root blkg * @return: true if this bio needs to be submitted with the root blkg context. @@ -471,8 +450,6 @@ static inline int blkcg_activate_policy(struct request_queue *q, static inline void blkcg_deactivate_policy(struct request_queue *q, const struct blkcg_policy *pol) { } -static inline struct blkcg *__bio_blkcg(struct bio *bio) { return NULL; } - static inline struct blkg_policy_data *blkg_to_pd(struct blkcg_gq *blkg, struct blkcg_policy *pol) { return NULL; } static inline struct blkcg_gq *pd_to_blkg(struct blkg_policy_data *pd) { return NULL; }