Skip to content

Commit

Permalink
blk-cgroup: avoid to warn !rcu_read_lock_held() in blkg_lookup()
Browse files Browse the repository at this point in the history
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: 83462a6 ("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>
  • Loading branch information
Ming Lei authored and Jens Axboe committed Nov 17, 2023
1 parent 27b13e2 commit 35a99d6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions block/blk-cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 35a99d6

Please sign in to comment.