summaryrefslogtreecommitdiff
path: root/rust/kernel/gpu/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2026-04-09 21:30:17 +0800
committerJens Axboe <axboe@kernel.dk>2026-04-09 19:10:44 -0600
commit365ea7cc62447caac508706b429cdf031cc15a9f (patch)
tree073aa6b283332e07cfba16f12200c6c2851dad5b /rust/kernel/gpu/git@git.tavy.me:linux-stable.git
parent5e864438e2853ef5112d7905fadcc3877e2be70a (diff)
ublk: allow buffer registration before device is started
Before START_DEV, there is no disk, no queue, no I/O dispatch, so the maple tree can be safely modified under ub->mutex alone without freezing the queue. Add ublk_lock_buf_tree()/ublk_unlock_buf_tree() helpers that take ub->mutex first, then freeze the queue if device is started. This ordering (mutex -> freeze) is safe because ublk_stop_dev_unlocked() already holds ub->mutex when calling del_gendisk() which freezes the queue. Suggested-by: Caleb Sander Mateos <csander@purestorage.com> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Link: https://patch.msgid.link/20260409133020.3780098-6-tom.leiming@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel/gpu/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions