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.zwis...@linux.intel.com>
> Signed-off-by: Dan Williams <dan.j.willi...@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.zwis...@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to