]> git.baikalelectronics.ru Git - kernel.git/commit
nvdimm/region: always show the 'align' attribute
authorVishal Verma <vishal.l.verma@intel.com>
Wed, 20 May 2020 22:50:26 +0000 (16:50 -0600)
committerDan Williams <dan.j.williams@intel.com>
Wed, 17 Jun 2020 21:08:31 +0000 (14:08 -0700)
commitf5fdea1bab2da7a08a4e590f1ce8d026426e6134
treebc61d74fd65536c1327193e046c9480320164322
parent74a27a5f5a99e6b5adfd790053b6cccac3270c76
nvdimm/region: always show the 'align' attribute

It is possible that a platform that is capable of 'namespace labels'
comes up without the labels properly initialized. In this case, the
region's 'align' attribute is hidden. Howerver, once the user does
initialize he labels, the 'align' attribute still stays hidden, which is
unexpected.

The sysfs_update_group() API is meant to address this, and could be
called during region probe, but it has entanglements with the device
'lockdep_mutex'. Therefore, simply make the 'align' attribute always
visible. It doesn't matter what it says for label-less namespaces, since
it is not possible to change their allocation anyway.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/20200520225026.29426-1-vishal.l.verma@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/region_devs.c