summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2016-11-13 22:02:15 -0500
committerTheodore Ts'o <tytso@mit.edu>2016-11-13 22:02:15 -0500
commita2f6d9c4c081ec2a02529b8af2c04f3e557a3a3e (patch)
tree643b4ba9e9f628a717d2d9741f0286842dcac28c /fs/ext4
parentbc33b0ca11e3df467777a4fa7639ba488c9d4911 (diff)
parent9484ab1bf4464faae695321dd4fa66365beda74e (diff)
Merge branch 'dax-4.10-iomap-pmd' into origin
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 9c064727ed62..3d58b2b477e8 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -767,6 +767,9 @@ static int _ext4_get_block(struct inode *inode, sector_t iblock,
ext4_update_bh_state(bh, map.m_flags);
bh->b_size = inode->i_sb->s_blocksize * map.m_len;
ret = 0;
+ } else if (ret == 0) {
+ /* hole case, need to fill in bh->b_size */
+ bh->b_size = inode->i_sb->s_blocksize * map.m_len;
}
return ret;
}