summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-11-21 00:08:05 +0100
committerTheodore Ts'o <tytso@mit.edu>2016-11-21 00:08:05 +0100
commit47e6935136b1f9fbda59cd929409f8e7cee4a1e4 (patch)
tree3b744419d652aaf8b045a742b91300667c00b501 /fs
parentext4: convert DAX reads to iomap infrastructure (diff)
downloadlinux-47e6935136b1f9fbda59cd929409f8e7cee4a1e4.tar.xz
linux-47e6935136b1f9fbda59cd929409f8e7cee4a1e4.zip
ext4: use iomap for zeroing blocks in DAX mode
Use iomap infrastructure for zeroing blocks when in DAX mode. ext4_iomap_begin() handles read requests just fine and that's all that is needed for iomap_zero_range(). Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/inode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 5e0526fed165..6d186ca2c34b 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3859,8 +3859,10 @@ static int ext4_block_zero_page_range(handle_t *handle,
if (length > max || length < 0)
length = max;
- if (IS_DAX(inode))
- return dax_zero_page_range(inode, from, length, ext4_get_block);
+ if (IS_DAX(inode)) {
+ return iomap_zero_range(inode, from, length, NULL,
+ &ext4_iomap_ops);
+ }
return __ext4_block_zero_page_range(handle, mapping, from, length);
}