mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 13:52:50 +01:00
nvme: Avoid flush dependency in delete controller flow
The nvme_delete_ctrl() function queues a work item on a MEM_RECLAIM queue (nvme_delete_wq), which eventually calls cleanup_srcu_struct(), which in turn flushes a delayed work from an !MEM_RECLAIM queue. This is unsafe as we might trigger deadlocks under severe memory pressure. Since we don't ever invoke call_srcu(), it is safe to use the shiny new _quiesced() version of srcu cleanup, thus avoiding that flush dependency. This commit makes that change. Signed-off-by: Nitzan Carmi <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Max Gurtovoy <[email protected]> Tested-by: Nicholas Piggin <[email protected]>
This commit is contained in:
1 parent
f7194ac32c
commit
4317228ad9
1 file changed
+1
-1
@@ -349,7 +349,7 @@ static void nvme_free_ns_head(struct kref *ref)
|
||||
nvme_mpath_remove_disk(head);
|
||||
ida_simple_remove(&head->subsys->ns_ida, head->instance);
|
||||
list_del_init(&head->entry);
|
||||
cleanup_srcu_struct(&head->srcu);
|
||||
cleanup_srcu_struct_quiesced(&head->srcu);
|
||||
kfree(head);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user