]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
blk-cgroup: don't nest queue_lock under rcu in bio_associate_blkg()
authorYu Kuai <yukuai@fygo.io>
Mon, 8 Jun 2026 03:42:46 +0000 (11:42 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Jun 2026 12:42:31 +0000 (06:42 -0600)
commit457d3c4f0fdd6cf8a4bd8115bf470809984a9f02
treef2856a5fb261f7547b351d32411ae0f3633b3afd
parent9327a865e395a53f67dffac4710beb1d4730495e
blk-cgroup: don't nest queue_lock under rcu in bio_associate_blkg()

If a bio is already associated with a blkg, the blkcg is already pinned
until the bio is done, so there is no need for RCU protection. Otherwise,
protect blkcg_css() with RCU independently. Prepare to protect blkcg with
blkcg_mutex instead of queue_lock.

Signed-off-by: Yu Kuai <yukuai@fygo.io>
Link: https://patch.msgid.link/8496fa234b21d4b31b7f068766906d0bffcac8e6.1780621988.git.yukuai@fygo.io
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c