summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/claim.c
diff options
context:
space:
mode:
authorLinus Torvalds2019-07-18 19:52:08 +0200
committerLinus Torvalds2019-07-18 19:52:08 +0200
commitf8c3500cd137867927bc080f4a6e02e0222dd1b8 (patch)
tree4bbcdedca12ec9d4db6f48f37052c983abc387b4 /drivers/nvdimm/claim.c
parentMerge tag 'linux-watchdog-5.3-rc1' of git://www.linux-watchdog.org/linux-watc... (diff)
parentvirtio_pmem: fix sparse warning (diff)
downloadkernel-qcow2-linux-f8c3500cd137867927bc080f4a6e02e0222dd1b8.tar.gz
kernel-qcow2-linux-f8c3500cd137867927bc080f4a6e02e0222dd1b8.tar.xz
kernel-qcow2-linux-f8c3500cd137867927bc080f4a6e02e0222dd1b8.zip
Merge tag 'libnvdimm-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm updates from Dan Williams: "Primarily just the virtio_pmem driver: - virtio_pmem The new virtio_pmem facility introduces a paravirtualized persistent memory device that allows a guest VM to use DAX mechanisms to access a host-file with host-page-cache. It arranges for MAP_SYNC to be disabled and instead triggers a host fsync() when a 'write-cache flush' command is sent to the virtual disk device. - Miscellaneous small fixups" * tag 'libnvdimm-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: virtio_pmem: fix sparse warning xfs: disable map_sync for async flush ext4: disable map_sync for async flush dax: check synchronous mapping is supported dm: enable synchronous dax libnvdimm: add dax_dev sync flag virtio-pmem: Add virtio pmem driver libnvdimm: nd_region flush callback support libnvdimm, namespace: Drop uuid_t implementation detail
Diffstat (limited to 'drivers/nvdimm/claim.c')
-rw-r--r--drivers/nvdimm/claim.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c
index 26c1c7618891..2985ca949912 100644
--- a/drivers/nvdimm/claim.c
+++ b/drivers/nvdimm/claim.c
@@ -255,7 +255,7 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev);
unsigned int sz_align = ALIGN(size + (offset & (512 - 1)), 512);
sector_t sector = offset >> 9;
- int rc = 0;
+ int rc = 0, ret = 0;
if (unlikely(!size))
return 0;
@@ -293,7 +293,9 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
}
memcpy_flushcache(nsio->addr + offset, buf, size);
- nvdimm_flush(to_nd_region(ndns->dev.parent));
+ ret = nvdimm_flush(to_nd_region(ndns->dev.parent), NULL);
+ if (ret)
+ rc = ret;
return rc;
}