[PATCH] NVMe: Use namespace list for scanning device

Keith Busch keith.busch at intel.com
Fri Sep 4 10:49:18 PDT 2015


On Fri, 4 Sep 2015, Keith Busch wrote:
> +static int nvme_scan_ns_list(struct nvme_dev *dev, int nn)
> +{
> +	int i, j, k, ret = 0;
> +	struct nvme_ns *ns;
> +	u32 *ns_list, nsid, prev = 0;
> +	unsigned num_lists = DIV_ROUND_UP(nn, 1024);
> +
> +	ns_list = kmalloc(0x1000, GFP_KERNEL);
> +	if (!*ns_list)
> +		return -ENOMEM;

code copy-paste fail... That should be

 	if (!ns_list)
 		return -ENOMEM;

Will resend.



More information about the Linux-nvme mailing list