Skip to content

Commit

Permalink
libnvdimm, pmem: use nvdimm_flush() for namespace I/O writes
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
djbw committed Jul 12, 2016
1 parent 14df6a4 commit 91131db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvdimm/claim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 91131db

Please sign in to comment.