[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151103191523.GC23366@linux.intel.com>
Date: Tue, 3 Nov 2015 12:15:23 -0700
From: Ross Zwisler <ross.zwisler@...ux.intel.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: axboe@...com, jack@...e.cz, linux-nvdimm@...ts.01.org,
david@...morbit.com, linux-kernel@...r.kernel.org,
ross.zwisler@...ux.intel.com, hch@....de
Subject: Re: [PATCH v3 04/15] libnvdimm, pmem: move request_queue allocation
earlier in probe
On Sun, Nov 01, 2015 at 11:30:04PM -0500, Dan Williams wrote:
> Before the dynamically allocated struct pages from devm_memremap_pages()
> can be put to use outside the driver, we need a mechanism to track
> whether they are still in use at teardown. Towards that goal reorder
> the initialization sequence to allow the 'q_usage_counter' from the
> request_queue to be used by the devm_memremap_pages() implementation (in
> subsequent patches).
>
> Cc: Ross Zwisler <ross.zwisler@...ux.intel.com>
> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
<>
> @@ -150,16 +151,23 @@ static struct pmem_device *pmem_alloc(struct device *dev,
> return ERR_PTR(-EBUSY);
> }
>
> - if (pmem_should_map_pages(dev))
> + q = blk_alloc_queue_node(GFP_KERNEL, dev_to_node(dev));
> + if (!q)
> + return ERR_PTR(-ENOMEM);
> +
> + if (pmem_should_map_pages(dev)) {
No need to introduce braces for this if().
Otherwise this looks fine.
Reviewed-by: Ross Zwisler <ross.zwisler@...ux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists