blk-cgroup: avoid to warn !rcu_read_lock_held() in blkg_lookup()
authorMing Lei <ming.lei@redhat.com>
Fri, 17 Nov 2023 02:35:23 +0000 (10:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 06:33:02 +0000 (07:33 +0100)
commit3902d1a1b6ddb1ba247b532ee7621d1cd8ac59c9
treeb21b468bd9bdac552f765910b3a476b1738c0bfb
parent18350d280999cbde37fcac4f55117fbb40972715
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 <czhong@redhat.com>
Fixes: 83462a6c971c ("blkcg: Drop unnecessary RCU read [un]locks from blkg_conf_prep/finish()")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20231117023527.3188627-3-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/blk-cgroup.h