From: Ming Lei Date: Fri, 17 Nov 2023 02:35:23 +0000 (+0800) Subject: blk-cgroup: avoid to warn !rcu_read_lock_held() in blkg_lookup() X-Git-Tag: v6.6.17~2501 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3902d1a1b6ddb1ba247b532ee7621d1cd8ac59c9;p=platform%2Fkernel%2Flinux-rpi.git blk-cgroup: avoid to warn !rcu_read_lock_held() in blkg_lookup() [ Upstream commit 35a99d6557cacbc177314735342f77a2dda41872 ] So far, all callers either holds spin lock or rcu read explicitly, and most of the caller has added WARN_ON_ONCE(!rcu_read_lock_held()) or lockdep_assert_held(&disk->queue->queue_lock). Remove WARN_ON_ONCE(!rcu_read_lock_held()) from blkg_lookup() for killing the false positive warning from blkg_conf_prep(). Reported-by: Changhui Zhong Fixes: 83462a6c971c ("blkcg: Drop unnecessary RCU read [un]locks from blkg_conf_prep/finish()") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20231117023527.3188627-3-ming.lei@redhat.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 624c03c..fd48243 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h @@ -249,8 +249,6 @@ static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, { struct blkcg_gq *blkg; - WARN_ON_ONCE(!rcu_read_lock_held()); - if (blkcg == &blkcg_root) return q->root_blkg;