From: Dan Williams Date: Thu, 2 Jun 2016 06:14:22 +0000 (-0700) Subject: libnvdimm, pmem: use nvdimm_flush() for namespace I/O writes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=91131dbd1d50637dc338526502a1a2ec5a7f97df;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Dan Williams --- 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;