Browse Source

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>
Dan Williams 9 years ago
parent
commit
91131dbd1d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/nvdimm/claim.c

+ 1 - 1
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);
 		return memcpy_from_pmem(buf, nsio->addr + offset, size);
 	} else {
 	} else {
 		memcpy_to_pmem(nsio->addr + offset, buf, size);
 		memcpy_to_pmem(nsio->addr + offset, buf, size);
-		wmb_pmem();
+		nvdimm_flush(to_nd_region(ndns->dev.parent));
 	}
 	}
 
 
 	return 0;
 	return 0;