summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-06-01 23:14:22 -0700
committerDan Williams <dan.j.williams@intel.com>2016-07-12 15:13:48 -0700
commit91131dbd1d50637dc338526502a1a2ec5a7f97df (patch)
tree922dd917f0d3f9884be31fd94166e805ebc4b545 /drivers/nvdimm
parent14df6a4e7eba62442aed70dfd5bbd76d2e491d50 (diff)
downloadlinux-91131dbd1d50637dc338526502a1a2ec5a7f97df.tar.gz
linux-91131dbd1d50637dc338526502a1a2ec5a7f97df.tar.bz2
linux-91131dbd1d50637dc338526502a1a2ec5a7f97df.zip
libnvdimm, pmem: use nvdimm_flush() for namespace I/O writes
nsio_rw_bytes() is used to write info block metadata to the namespace, so it should trigger a flush after every write. Replace wmb_pmem() with nvdimm_flush() in this path. Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r--drivers/nvdimm/claim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c
index 9997ff94a132..d5dc80c48b4c 100644
--- a/drivers/nvdimm/claim.c
+++ b/drivers/nvdimm/claim.c
@@ -240,7 +240,7 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
return memcpy_from_pmem(buf, nsio->addr + offset, size);
} else {
memcpy_to_pmem(nsio->addr + offset, buf, size);
- wmb_pmem();
+ nvdimm_flush(to_nd_region(ndns->dev.parent));
}
return 0;