libnvdimm/namespace: Fix visibility of namespace resource attribute
authorDan Williams <dan.j.williams@intel.com>
Wed, 13 Jan 2021 07:35:50 +0000 (23:35 -0800)
committerDan Williams <dan.j.williams@intel.com>
Thu, 28 Jan 2021 08:22:34 +0000 (00:22 -0800)
commit13f445d65955f388499f00851dc9a86280970f7c
tree1311878d7cc51b7ec0d4e3a30b9a882eeba38072
parent5b04cb8224ef9bf0d9af8a4c0e6e23806bb2d720
libnvdimm/namespace: Fix visibility of namespace resource attribute

Legacy pmem namespaces lost support for the "resource" attribute when
the code was cleaned up to put the permission visibility in the
declaration. Restore this by listing 'resource' in the default
attributes.

A new ndctl regression test for pfn_to_online_page() corner cases builds
on this fix.

Fixes: bfd2e9140656 ("libnvdimm: Simplify root read-only definition for the 'resource' attribute")
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/161052334995.1805594.12054873528154362921.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/namespace_devs.c