]> www.infradead.org Git - users/dwmw2/linux.git/commit
nvdimm/region: Fix default alignment for small regions
authorDan Williams <dan.j.williams@intel.com>
Thu, 10 Mar 2022 03:49:21 +0000 (19:49 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:40:26 +0000 (14:40 +0200)
commit431f8a9cec07537050b59837f1111ff3f2609f0c
tree4ca492a5d00909f86b684ccc0994c815c71a0116
parentf7210ca29a783c94478da02368731e4c9cf7cdb7
nvdimm/region: Fix default alignment for small regions

[ Upstream commit d9d290d7e659e9db3e4518040cc18b97f5535f4a ]

In preparation for removing BLK aperture support the NVDIMM unit tests
discovered that the default alignment can be set higher than the
capacity of the region. Fall back to PAGE_SIZE in that case.

Given this has not been seen in the wild, elide notifying -stable.

Fixes: 2522afb86a8c ("libnvdimm/region: Introduce an 'align' attribute")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/164688416128.2879318.17890707310125575258.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvdimm/region_devs.c