block: kill bdev_dax_capable()
authorDan Williams <dan.j.williams@intel.com>
Fri, 27 Jan 2017 07:30:05 +0000 (23:30 -0800)
committerDan Williams <dan.j.williams@intel.com>
Thu, 20 Apr 2017 18:57:52 +0000 (11:57 -0700)
This is leftover dead code that has since been replaced by
bdev_dax_supported().

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
fs/block_dev.c
include/linux/blkdev.h

index 2eca00ec43706bb78955cd221a24593942625d57..7f40ea2f0875fab5b1ca11b138b2087b90779598 100644 (file)
@@ -807,30 +807,6 @@ int bdev_dax_supported(struct super_block *sb, int blocksize)
 }
 EXPORT_SYMBOL_GPL(bdev_dax_supported);
 
-/**
- * bdev_dax_capable() - Return if the raw device is capable for dax
- * @bdev: The device for raw block device access
- */
-bool bdev_dax_capable(struct block_device *bdev)
-{
-       struct blk_dax_ctl dax = {
-               .size = PAGE_SIZE,
-       };
-
-       if (!IS_ENABLED(CONFIG_FS_DAX))
-               return false;
-
-       dax.sector = 0;
-       if (bdev_direct_access(bdev, &dax) < 0)
-               return false;
-
-       dax.sector = bdev->bd_part->nr_sects - (PAGE_SIZE / 512);
-       if (bdev_direct_access(bdev, &dax) < 0)
-               return false;
-
-       return true;
-}
-
 /*
  * pseudo-fs
  */
index 5a7da607ca045f81a46e7b73bb31a8f1b978452a..f72708399b838eff601a004e546d57c75de8e0d0 100644 (file)
@@ -1958,7 +1958,6 @@ extern int bdev_write_page(struct block_device *, sector_t, struct page *,
                                                struct writeback_control *);
 extern long bdev_direct_access(struct block_device *, struct blk_dax_ctl *);
 extern int bdev_dax_supported(struct super_block *, int);
-extern bool bdev_dax_capable(struct block_device *);
 #else /* CONFIG_BLOCK */
 
 struct block_device;