blk-cgroup: don't nest queue_lock under rcu in blkg_lookup_create()
authorYu Kuai <yukuai@fygo.io>
Mon, 8 Jun 2026 03:42:45 +0000 (11:42 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Jun 2026 12:42:31 +0000 (06:42 -0600)
commit9327a865e395a53f67dffac4710beb1d4730495e
treea73678760da9953814230115fc25e74d732ae96a
parent56cc24f59c145ce6938959f792df04b8a4f5a4d8
blk-cgroup: don't nest queue_lock under rcu in blkg_lookup_create()

Change this in two steps:

1) hold rcu lock and do blkg_lookup() from fast path;
2) hold queue_lock directly from slow path, and don't nest it under rcu
   lock;

Prepare to convert protecting blkcg with blkcg_mutex instead of
queue_lock.

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