summaryrefslogtreecommitdiff
path: root/drivers/dax
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-09-08 07:41:40 +0300
committerDave Airlie <airlied@redhat.com>2020-09-08 07:41:40 +0300
commitce5c207c6b8dd9cdeaeeb2345b8a69335c0d98bf (patch)
tree3a54614d597b7b92ada36c5ea26dc994216b628b /drivers/dax
parent3393649977f9a8847c659e282ea290d4b703295c (diff)
parentf4d51dffc6c01a9e94650d95ce0104964f8ae822 (diff)
downloadlinux-ce5c207c6b8dd9cdeaeeb2345b8a69335c0d98bf.tar.xz
Merge tag 'v5.9-rc4' into drm-next
Backmerge 5.9-rc4 as there is a nasty qxl conflict that needs to be resolved. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/dax')
-rw-r--r--drivers/dax/device.c2
-rw-r--r--drivers/dax/super.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/dax/device.c b/drivers/dax/device.c
index 4c0af2eb7e19..1e89513f3c59 100644
--- a/drivers/dax/device.c
+++ b/drivers/dax/device.c
@@ -429,7 +429,7 @@ int dev_dax_probe(struct device *dev)
return -EBUSY;
}
- dev_dax->pgmap.type = MEMORY_DEVICE_DEVDAX;
+ dev_dax->pgmap.type = MEMORY_DEVICE_GENERIC;
addr = devm_memremap_pages(dev, &dev_dax->pgmap);
if (IS_ERR(addr))
return PTR_ERR(addr);
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index c82cbcb64202..32642634c1bb 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -100,6 +100,12 @@ bool __generic_fsdax_supported(struct dax_device *dax_dev,
return false;
}
+ if (!dax_dev && !bdev_dax_supported(bdev, blocksize)) {
+ pr_debug("%s: error: dax unsupported by block device\n",
+ bdevname(bdev, buf));
+ return false;
+ }
+
id = dax_read_lock();
len = dax_direct_access(dax_dev, pgoff, 1, &kaddr, &pfn);
len2 = dax_direct_access(dax_dev, pgoff_end, 1, &end_kaddr, &end_pfn);