summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2026-03-05 11:15:50 +0800
committerJens Axboe <axboe@kernel.dk>2026-03-05 04:01:42 -0700
commitce8ee8583ed83122405eabaa8fb351be4d9dc65c (patch)
tree86439944b7169805737e33b20c125e79eed23fba /include/linux
parentd90c470b0eca9d2d77a23a1cd7d6ac7fb02d7cb8 (diff)
block: use trylock to avoid lockdep circular dependency in sysfs
Use trylock instead of blocking lock acquisition for update_nr_hwq_lock in queue_requests_store() and elv_iosched_store() to avoid circular lock dependency with kernfs active reference during concurrent disk deletion: update_nr_hwq_lock -> kn->active (via del_gendisk -> kobject_del) kn->active -> update_nr_hwq_lock (via sysfs write path) Return -EBUSY when the lock is not immediately available. Reported-and-tested-by: Yi Zhang <yi.zhang@redhat.com> Closes: https://lore.kernel.org/linux-block/CAHj4cs-em-4acsHabMdT=jJhXkCzjnprD-aQH1OgrZo4nTnmMw@mail.gmail.com/ Fixes: 626ff4f8ebcb ("blk-mq: convert to serialize updating nr_requests with update_nr_hwq_lock") Signed-off-by: Ming Lei <ming.lei@redhat.com> Tested-by: Yi Zhang <yi.zhang@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions