]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
block: Remove elevator_lock usage from blkg_conf frozen operations
authorMing Lei <ming.lei@redhat.com>
Wed, 15 Oct 2025 10:30:39 +0000 (18:30 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Oct 2025 14:00:19 +0000 (08:00 -0600)
commit08823e89e3e269bf4c4a20b4c24a8119920cc7a4
tree38e776f8614ba6bec726f8e8a45a5bc54035af73
parentdc96cefef0d3032c69e46a21b345c60e56b18934
block: Remove elevator_lock usage from blkg_conf frozen operations

Remove the acquisition and release of q->elevator_lock in the
blkg_conf_open_bdev_frozen() and blkg_conf_exit_frozen() functions. The
elevator lock is no longer needed in these code paths since commit
78c271344b6f ("block: move wbt_enable_default() out of queue freezing
from sched ->exit()") which introduces `disk->rqos_state_mutex` for
protecting wbt state change, and not necessary to abuse elevator_lock
for this purpose.

This change helps to solve the lockdep warning reported from Yu Kuai[1].

Pass blktests/throtl with lockdep enabled.

Links: https://lore.kernel.org/linux-block/e5e7ac3f-2063-473a-aafb-4d8d43e5576e@yukuai.org.cn/ [1]
Fixes: commit 78c271344b6f ("block: move wbt_enable_default() out of queue freezing from sched ->exit()")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c