Re: [PATCH] ublk: drop the device reference outside ublk_ctl_mutex in DEL_DEV
From: Jens Axboe
Date: Thu Oct 01 2026 - 10:50:08 EST
On Thu, 01 Oct 2026 11:10:47 +0800, Qiliang Yuan wrote:
> ublk_ctrl_del_dev() drops its reference to the device while holding the
> global ublk_ctl_mutex. When this is the last reference, ublk_cdev_rel()
> frees the tag set, and blk_mq_free_tag_set() waits for the pending SRCU
> callbacks of the tag set with srcu_barrier(). Every DEL_DEV thus waits
> for an SRCU grace period with the mutex held, and deleting devices from
> several threads serializes on it.
>
> [...]
Applied, thanks!
[1/1] ublk: drop the device reference outside ublk_ctl_mutex in DEL_DEV
commit: 812485c8ff2609489b164415befc7189965e1b38
Best regards,
--
Jens Axboe