[PATCHv2] NVMe: Fix partition detection issue(hot remove followed by hot add)
Keith Busch
keith.busch at intel.com
Tue Dec 9 08:18:31 PST 2014
On Tue, 9 Dec 2014, Indraneel Mukherjee wrote:
> diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
> --- a/drivers/block/nvme-core.c
> +++ b/drivers/block/nvme-core.c
> @@ -2735,7 +2735,6 @@ static void nvme_free_dev(struct kref *kref)
>
> pci_dev_put(dev->pci_dev);
> nvme_free_namespaces(dev);
> - nvme_release_instance(dev);
> free_percpu(dev->io_queue);
> kfree(dev->queues);
> kfree(dev->entry);
> @@ -2996,6 +2995,7 @@ static void nvme_remove(struct pci_dev *pdev)
> nvme_dev_shutdown(dev);
> nvme_free_queues(dev, 0);
> nvme_dev_remove(dev);
> + nvme_release_instance(dev);
> nvme_release_prp_pools(dev);
> kref_put(&dev->kref, nvme_free_dev);
> }
>
> This ensures that the new node gets a different name (in case there is a
> stale node).
>
> If the fix is okay, I can send this separately as a patch.
Yes, please send as a patch and I'd Ack it. You might want to make one
against Jens' linux-block tree as well.
More information about the Linux-nvme
mailing list