|
@@ -1697,13 +1697,24 @@ static int blkdev_releasepage(struct page *page, gfp_t wait)
|
|
|
return try_to_free_buffers(page);
|
|
|
}
|
|
|
|
|
|
+static int blkdev_writepages(struct address_space *mapping,
|
|
|
+ struct writeback_control *wbc)
|
|
|
+{
|
|
|
+ if (dax_mapping(mapping)) {
|
|
|
+ struct block_device *bdev = I_BDEV(mapping->host);
|
|
|
+
|
|
|
+ return dax_writeback_mapping_range(mapping, bdev, wbc);
|
|
|
+ }
|
|
|
+ return generic_writepages(mapping, wbc);
|
|
|
+}
|
|
|
+
|
|
|
static const struct address_space_operations def_blk_aops = {
|
|
|
.readpage = blkdev_readpage,
|
|
|
.readpages = blkdev_readpages,
|
|
|
.writepage = blkdev_writepage,
|
|
|
.write_begin = blkdev_write_begin,
|
|
|
.write_end = blkdev_write_end,
|
|
|
- .writepages = generic_writepages,
|
|
|
+ .writepages = blkdev_writepages,
|
|
|
.releasepage = blkdev_releasepage,
|
|
|
.direct_IO = blkdev_direct_IO,
|
|
|
.is_dirty_writeback = buffer_check_dirty_writeback,
|