Re: [PATCH] nvme-multipath: call del_gendisk() in nvme_mpath_check_last_path()
From: Christoph Hellwig <hch@lst.de>
Date: 2021-06-03 07:22:59
From: Christoph Hellwig <hch@lst.de>
Date: 2021-06-03 07:22:59
+void nvme_mpath_check_last_path(struct nvme_ns *ns)
{
+ struct nvme_ns_head *head = ns->head;
+
if (!head->disk)
return;
- if (head->disk->flags & GENHD_FL_UP) {
+
+ if (list_empty(&head->list) && head->disk->flags & GENHD_FL_UP) {Please add the braces around the "&".
nvme_cdev_del(&head->cdev, &head->cdev_device); del_gendisk(head->disk); } +}
Also it seems like we can just pass the head here, no need for ns.
- if (head->disk && list_empty(&head->list)) - kblockd_schedule_work(&head->requeue_work);
Did this get lost in the new version? _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme