diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-01-27 02:30:05 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-04-20 14:57:52 -0400 |
commit | d8f07aee3f2fd959878bf614d4e984900018eb9e (patch) | |
tree | c9931d6bed75fdf3516b1d079cae841e9e97e2fe | |
parent | 7a2765f6e82063f348ebce78c28eceff741689d4 (diff) |
block: kill bdev_dax_capable()
This is leftover dead code that has since been replaced by
bdev_dax_supported().
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | fs/block_dev.c | 24 | ||||
-rw-r--r-- | include/linux/blkdev.h | 1 |
2 files changed, 0 insertions, 25 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 2eca00ec4370..7f40ea2f0875 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -807,30 +807,6 @@ int bdev_dax_supported(struct super_block *sb, int blocksize) | |||
807 | } | 807 | } |
808 | EXPORT_SYMBOL_GPL(bdev_dax_supported); | 808 | EXPORT_SYMBOL_GPL(bdev_dax_supported); |
809 | 809 | ||
810 | /** | ||
811 | * bdev_dax_capable() - Return if the raw device is capable for dax | ||
812 | * @bdev: The device for raw block device access | ||
813 | */ | ||
814 | bool bdev_dax_capable(struct block_device *bdev) | ||
815 | { | ||
816 | struct blk_dax_ctl dax = { | ||
817 | .size = PAGE_SIZE, | ||
818 | }; | ||
819 | |||
820 | if (!IS_ENABLED(CONFIG_FS_DAX)) | ||
821 | return false; | ||
822 | |||
823 | dax.sector = 0; | ||
824 | if (bdev_direct_access(bdev, &dax) < 0) | ||
825 | return false; | ||
826 | |||
827 | dax.sector = bdev->bd_part->nr_sects - (PAGE_SIZE / 512); | ||
828 | if (bdev_direct_access(bdev, &dax) < 0) | ||
829 | return false; | ||
830 | |||
831 | return true; | ||
832 | } | ||
833 | |||
834 | /* | 810 | /* |
835 | * pseudo-fs | 811 | * pseudo-fs |
836 | */ | 812 | */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 5a7da607ca04..f72708399b83 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1958,7 +1958,6 @@ extern int bdev_write_page(struct block_device *, sector_t, struct page *, | |||
1958 | struct writeback_control *); | 1958 | struct writeback_control *); |
1959 | extern long bdev_direct_access(struct block_device *, struct blk_dax_ctl *); | 1959 | extern long bdev_direct_access(struct block_device *, struct blk_dax_ctl *); |
1960 | extern int bdev_dax_supported(struct super_block *, int); | 1960 | extern int bdev_dax_supported(struct super_block *, int); |
1961 | extern bool bdev_dax_capable(struct block_device *); | ||
1962 | #else /* CONFIG_BLOCK */ | 1961 | #else /* CONFIG_BLOCK */ |
1963 | 1962 | ||
1964 | struct block_device; | 1963 | struct block_device; |