[PATCH 2/9] nvme: fix the deadlock in nvme_update_formats

Sagi Grimberg sagi at grimberg.me
Sun Feb 11 03:16:02 PST 2018


>   	mutex_lock(&ctrl->namespaces_mutex);
>   	list_for_each_entry(ns, &ctrl->namespaces, list) {
> -		if (ns->disk && nvme_revalidate_disk(ns->disk))
> -			nvme_ns_remove(ns);
> +		if (ns->disk && nvme_revalidate_disk(ns->disk)) {
> +			list_del_init(&ns->list);
> +			list_add_tail(&ns->list, &rm_list);

list_move_tail?



More information about the Linux-nvme mailing list