[PATCH 13/19] nvmet-rdma: take a device off the list last

Christoph Hellwig hch at lst.de
Mon Nov 2 22:09:16 PST 2026


> @@ -1197,13 +1197,17 @@ static void nvmet_rdma_free_dev(struct kref *ref)
>  	struct nvmet_rdma_device *ndev =
>  		container_of(ref, struct nvmet_rdma_device, ref);
>  
> +	nvmet_rdma_destroy_srqs(ndev);
> +	ib_dealloc_pd(ndev->pd);
> +
> +	/*
> +	 * Not earlier: nvmet_rdma_remove_one() waits for the release work that
> +	 * got here only if it finds the device on the list.
> +	 */

Very odd wording.  This should be something like:

	/*
	 * Only delete from the device list once all RDMA resources are torn
	 * down because nvmet_rdma_remove_one waits for the release work only
	 * if the device still is on the list.
	 */

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch at lst.de>



More information about the Linux-nvme mailing list