aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ea5c47608cea..5f7295287de1 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3196,7 +3196,7 @@ static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
3196 void *data) 3196 void *data)
3197{ 3197{
3198 struct fiemap_extent_info *fieinfo = data; 3198 struct fiemap_extent_info *fieinfo = data;
3199 unsigned long blksize_bits = inode->i_sb->s_blocksize_bits; 3199 unsigned char blksize_bits = inode->i_sb->s_blocksize_bits;
3200 __u64 logical; 3200 __u64 logical;
3201 __u64 physical; 3201 __u64 physical;
3202 __u64 length; 3202 __u64 length;
@@ -3243,8 +3243,8 @@ static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
3243 * 3243 *
3244 * XXX this might miss a single-block extent at EXT_MAX_BLOCK 3244 * XXX this might miss a single-block extent at EXT_MAX_BLOCK
3245 */ 3245 */
3246 if (logical + length - 1 == EXT_MAX_BLOCK || 3246 if (ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK ||
3247 ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK) 3247 newex->ec_block + newex->ec_len - 1 == EXT_MAX_BLOCK)
3248 flags |= FIEMAP_EXTENT_LAST; 3248 flags |= FIEMAP_EXTENT_LAST;
3249 3249
3250 error = fiemap_fill_next_extent(fieinfo, logical, physical, 3250 error = fiemap_fill_next_extent(fieinfo, logical, physical,