libnvdimm, pmem: Fix memcpy_mcsafe() return code handling in nsio_rw_bytes()
authorDan Williams <dan.j.williams@intel.com>
Mon, 18 Jun 2018 17:07:35 +0000 (10:07 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 29 Jun 2018 01:21:30 +0000 (18:21 -0700)
commitb62cc6fdd793eaac50e4191c8637ffff9e9574d6
tree0fb9070a2031d2cdf9367d7c7fb8f82adc90e17c
parent7daf201d7fe8334e2d2364d4e8ed3394ec9af819
libnvdimm, pmem: Fix memcpy_mcsafe() return code handling in nsio_rw_bytes()

Commit 60622d68227d "x86/asm/memcpy_mcsafe: Return bytes remaining"
converted callers of memcpy_mcsafe() to expect a positive 'bytes
remaining' value rather than a negative error code. The nsio_rw_bytes()
conversion failed to return success. The failure is benign in that
nsio_rw_bytes() will end up writing back what it just read.

Fixes: 60622d68227d ("x86/asm/memcpy_mcsafe: Return bytes remaining")
Cc: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/claim.c