Skip to content

Commit 2237570

Browse files
Christoph Hellwigaxboe
authored andcommitted
block_dev: remove DAX leftovers
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 <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent d21ea4b commit 2237570

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

fs/block_dev.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
180180
struct file *file = iocb->ki_filp;
181181
struct inode *inode = bdev_file_inode(file);
182182

183-
if (IS_DAX(inode))
184-
return dax_do_io(iocb, inode, iter, blkdev_get_block,
185-
NULL, DIO_SKIP_DIO_COUNT);
186183
return __blockdev_direct_IO(iocb, inode, I_BDEV(inode), iter,
187184
blkdev_get_block, NULL, NULL,
188185
DIO_SKIP_DIO_COUNT);
@@ -1275,7 +1272,6 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
12751272
bdev->bd_disk = disk;
12761273
bdev->bd_queue = disk->queue;
12771274
bdev->bd_contains = bdev;
1278-
bdev->bd_inode->i_flags = 0;
12791275

12801276
if (!partno) {
12811277
ret = -ENXIO;
@@ -1303,11 +1299,8 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
13031299
}
13041300
}
13051301

1306-
if (!ret) {
1302+
if (!ret)
13071303
bd_set_size(bdev,(loff_t)get_capacity(disk)<<9);
1308-
if (!bdev_dax_capable(bdev))
1309-
bdev->bd_inode->i_flags &= ~S_DAX;
1310-
}
13111304

13121305
/*
13131306
* If the device is invalidated, rescan partition
@@ -1342,8 +1335,6 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
13421335
goto out_clear;
13431336
}
13441337
bd_set_size(bdev, (loff_t)bdev->bd_part->nr_sects << 9);
1345-
if (!bdev_dax_capable(bdev))
1346-
bdev->bd_inode->i_flags &= ~S_DAX;
13471338
}
13481339
} else {
13491340
if (bdev->bd_contains == bdev) {

0 commit comments

Comments
 (0)