Thread (4 messages) 4 messages, 2 authors, 2021-06-07

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

+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help