Home Home > GIT Browse > SLE12-SP5-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-08-21 14:25:48 +0200
committerMichal Suchanek <msuchanek@suse.de>2019-08-21 14:25:48 +0200
commit124333ea28b684cc2f1099400d758764fbb0ba89 (patch)
treef28e01f6609e75824eed292d9e8b2bef31494a5d
parent7233ee821215119533c594c3d00088df2d6c0f01 (diff)
libnvdimm/pfn: Store correct value of npfns in namespace
superblock (bsc#1146381 ltc#180720). suse-commit: e7033078aca157d5b27ab4eb88e1b96e22ef187e
-rw-r--r--drivers/nvdimm/pfn_devs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
index 94a3ecdf085b..befca9a8fe4e 100644
--- a/drivers/nvdimm/pfn_devs.c
+++ b/drivers/nvdimm/pfn_devs.c
@@ -683,7 +683,7 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)
return -ENXIO;
}
- npfns = (size - offset - start_pad - end_trunc) / SZ_4K;
+ npfns = PHYS_PFN(size - offset - start_pad - end_trunc);
pfn_sb->mode = cpu_to_le32(nd_pfn->mode);
pfn_sb->dataoff = cpu_to_le64(offset);
pfn_sb->npfns = cpu_to_le64(npfns);