On 2021/12/03 15:50, Christoph Hellwig wrote: > task_work_add sounds nice, but it is currently not exported which might > be for a reason (I don't really have any experience with it). I didn't find a reason not to export. But generally task_work_add() users seem to implement a fallback which uses a WQ in case task_work_add() failed (i.e. exit_task_work() was already called from do_exit()) or task_work_add() cannot be used (e.g. the caller is a kernel thread). I don't know if there is possibility that a kernel thread calls blkdev_put(), but implementing the fallback path after all requires WQ. Thus, I think that starting from WQ only and see if something breaks is fine.