diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2019-02-27 12:02:05 -0500 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2019-03-05 14:53:52 -0500 |
commit | c439ca69d5c8306a14ee2f3f39e9c833b4cda3e7 (patch) | |
tree | 83a4784e0edb4313fe2f5ab3fa3c35fef54858eb | |
parent | de7180ff908b2bc0342e832dbdaa9a5f1ecaa33a (diff) |
dm snapshot: don't define direct_access if we don't support it
Don't define a direct_access function that fails, dm_dax_direct_access
already fails with -EIO if the pointer is zero;
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
-rw-r--r-- | drivers/md/dm-snap.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 36805b12661e..a168963b757d 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c @@ -2338,13 +2338,6 @@ static int origin_map(struct dm_target *ti, struct bio *bio) return do_origin(o->dev, bio); } -static long origin_dax_direct_access(struct dm_target *ti, pgoff_t pgoff, - long nr_pages, void **kaddr, pfn_t *pfn) -{ - DMWARN("device does not support dax."); - return -EIO; -} - /* * Set the target "max_io_len" field to the minimum of all the snapshots' * chunk sizes. @@ -2404,7 +2397,6 @@ static struct target_type origin_target = { .postsuspend = origin_postsuspend, .status = origin_status, .iterate_devices = origin_iterate_devices, - .direct_access = origin_dax_direct_access, }; static struct target_type snapshot_target = { |