diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-01-27 20:22:03 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-04-25 16:20:46 -0400 |
commit | d4b29fd78ea6fc2be219be3af1a992149b4ff0f6 (patch) | |
tree | 4020240085b9b61af2a27ebd454693e60f9ecd61 /drivers/block | |
parent | 2093f2e9dfec98e561c83e807910267bcbd8bb7b (diff) |
block: remove block_device_operations ->direct_access()
Now that all the producers and consumers of dax interfaces have been
converted to using dax_operations on a dax_device, remove the block
device direct_access enabling.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/brd.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 60f3193c9ce2..bfa4ed2c75ef 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c | |||
@@ -395,18 +395,6 @@ static long __brd_direct_access(struct brd_device *brd, pgoff_t pgoff, | |||
395 | return 1; | 395 | return 1; |
396 | } | 396 | } |
397 | 397 | ||
398 | static long brd_blk_direct_access(struct block_device *bdev, sector_t sector, | ||
399 | void **kaddr, pfn_t *pfn, long size) | ||
400 | { | ||
401 | struct brd_device *brd = bdev->bd_disk->private_data; | ||
402 | long nr_pages = __brd_direct_access(brd, PHYS_PFN(sector * 512), | ||
403 | PHYS_PFN(size), kaddr, pfn); | ||
404 | |||
405 | if (nr_pages < 0) | ||
406 | return nr_pages; | ||
407 | return nr_pages * PAGE_SIZE; | ||
408 | } | ||
409 | |||
410 | static long brd_dax_direct_access(struct dax_device *dax_dev, | 398 | static long brd_dax_direct_access(struct dax_device *dax_dev, |
411 | pgoff_t pgoff, long nr_pages, void **kaddr, pfn_t *pfn) | 399 | pgoff_t pgoff, long nr_pages, void **kaddr, pfn_t *pfn) |
412 | { | 400 | { |
@@ -418,14 +406,11 @@ static long brd_dax_direct_access(struct dax_device *dax_dev, | |||
418 | static const struct dax_operations brd_dax_ops = { | 406 | static const struct dax_operations brd_dax_ops = { |
419 | .direct_access = brd_dax_direct_access, | 407 | .direct_access = brd_dax_direct_access, |
420 | }; | 408 | }; |
421 | #else | ||
422 | #define brd_blk_direct_access NULL | ||
423 | #endif | 409 | #endif |
424 | 410 | ||
425 | static const struct block_device_operations brd_fops = { | 411 | static const struct block_device_operations brd_fops = { |
426 | .owner = THIS_MODULE, | 412 | .owner = THIS_MODULE, |
427 | .rw_page = brd_rw_page, | 413 | .rw_page = brd_rw_page, |
428 | .direct_access = brd_blk_direct_access, | ||
429 | }; | 414 | }; |
430 | 415 | ||
431 | /* | 416 | /* |