diff mbox

block_dev: remove DAX leftovers

Message ID 1473846973-18798-1-git-send-email-hch@lst.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christoph Hellwig Sept. 14, 2016, 9:56 a.m. UTC
DAX support for block devices was removed in commits 03cdad
("block: disable block device DAX by default") and 99a01cd
("block: remove BLK_DEV_DAX config option"), but we still kept a call to
dax_do_io and some uneeded i_flags manipulations introduced in commit
bbab37 ("block: Add support for DAX reads/writes to block devices").

Remove those leftovers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/block_dev.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Comments

Johannes Thumshirn Sept. 14, 2016, 10:57 a.m. UTC | #1
On Wed, Sep 14, 2016 at 11:56:13AM +0200, Christoph Hellwig wrote:
> DAX support for block devices was removed in commits 03cdad
> ("block: disable block device DAX by default") and 99a01cd
> ("block: remove BLK_DEV_DAX config option"), but we still kept a call to
> dax_do_io and some uneeded i_flags manipulations introduced in commit
> bbab37 ("block: Add support for DAX reads/writes to block devices").
> 
> Remove those leftovers.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Dan Williams Sept. 14, 2016, 2:12 p.m. UTC | #2
On Wed, Sep 14, 2016 at 2:56 AM, Christoph Hellwig <hch@lst.de> wrote:
> DAX support for block devices was removed in commits 03cdad
> ("block: disable block device DAX by default") and 99a01cd
> ("block: remove BLK_DEV_DAX config option"), but we still kept a call to
> dax_do_io and some uneeded i_flags manipulations introduced in commit
> bbab37 ("block: Add support for DAX reads/writes to block devices").
>
> Remove those leftovers.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Acked-by: Dan Williams <dan.j.williams@intel.com>
Jens Axboe Sept. 14, 2016, 2:42 p.m. UTC | #3
On 09/14/2016 03:56 AM, Christoph Hellwig wrote:
> DAX support for block devices was removed in commits 03cdad
> ("block: disable block device DAX by default") and 99a01cd
> ("block: remove BLK_DEV_DAX config option"), but we still kept a call to
> dax_do_io and some uneeded i_flags manipulations introduced in commit
> bbab37 ("block: Add support for DAX reads/writes to block devices").

Applied for 4.9, thanks.
diff mbox

Patch

diff --git a/fs/block_dev.c b/fs/block_dev.c
index c3cdde8..45f5491 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -180,9 +180,6 @@  blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
 	struct file *file = iocb->ki_filp;
 	struct inode *inode = bdev_file_inode(file);
 
-	if (IS_DAX(inode))
-		return dax_do_io(iocb, inode, iter, blkdev_get_block,
-				NULL, DIO_SKIP_DIO_COUNT);
 	return __blockdev_direct_IO(iocb, inode, I_BDEV(inode), iter,
 				    blkdev_get_block, NULL, NULL,
 				    DIO_SKIP_DIO_COUNT);
@@ -1274,7 +1271,6 @@  static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
 		bdev->bd_disk = disk;
 		bdev->bd_queue = disk->queue;
 		bdev->bd_contains = bdev;
-		bdev->bd_inode->i_flags = 0;
 
 		if (!partno) {
 			ret = -ENXIO;
@@ -1302,11 +1298,8 @@  static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
 				}
 			}
 
-			if (!ret) {
+			if (!ret)
 				bd_set_size(bdev,(loff_t)get_capacity(disk)<<9);
-				if (!bdev_dax_capable(bdev))
-					bdev->bd_inode->i_flags &= ~S_DAX;
-			}
 
 			/*
 			 * If the device is invalidated, rescan partition
@@ -1341,8 +1334,6 @@  static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
 				goto out_clear;
 			}
 			bd_set_size(bdev, (loff_t)bdev->bd_part->nr_sects << 9);
-			if (!bdev_dax_capable(bdev))
-				bdev->bd_inode->i_flags &= ~S_DAX;
 		}
 	} else {
 		if (bdev->bd_contains == bdev) {