lkml.org 
[lkml]   [2015]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@linux.intel.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.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@linux.intel.com>


\
 
 \ /
  Last update: 2015-11-03 20:41    [W:0.169 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site