mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
libnvdimm: fix phys_addr for nvdimm_clear_poison
nvdimm_clear_poison() expects a physical address, not an offset. Fix nsio_rw_bytes() to call nvdimm_clear_poison() with a physical address. Signed-off-by: Toshi Kani <[email protected]> Cc: Dave Jiang <[email protected]> Cc: Vishal Verma <[email protected]> Reviewed-by: Vishal Verma <[email protected]> Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
bc042fdfbb
commit
97681f9b08
1 changed files with 2 additions and 1 deletions
|
|
@ -246,7 +246,8 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
|
|||
if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512)) {
|
||||
long cleared;
|
||||
|
||||
cleared = nvdimm_clear_poison(&ndns->dev, offset, size);
|
||||
cleared = nvdimm_clear_poison(&ndns->dev,
|
||||
nsio->res.start + offset, size);
|
||||
if (cleared < size)
|
||||
rc = -EIO;
|
||||
if (cleared > 0 && cleared / 512) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue