Skip to content

Commit 35a99d6

Browse files
Ming Leiaxboe
authored andcommitted
blk-cgroup: avoid to warn !rcu_read_lock_held() in blkg_lookup()
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 <[email protected]> Fixes: 83462a6 ("blkcg: Drop unnecessary RCU read [un]locks from blkg_conf_prep/finish()") Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 27b13e2 commit 35a99d6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

block/blk-cgroup.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@ static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg,
249249
{
250250
struct blkcg_gq *blkg;
251251

252-
WARN_ON_ONCE(!rcu_read_lock_held());
253-
254252
if (blkcg == &blkcg_root)
255253
return q->root_blkg;
256254

0 commit comments

Comments
 (0)