/*
* Mount options
-@@ -1130,6 +1133,9 @@ extern int ext4_page_mkwrite(struct vm_a
+@@ -1132,6 +1135,9 @@ extern int ext4_page_mkwrite(struct vm_a
/* ioctl.c */
extern long ext4_ioctl(struct file *, unsigned int, unsigned long);
extern long ext4_compat_ioctl(struct file *, unsigned int, unsigned long);
+ void *data)
+{
+ struct fiemap_extent_info *fieinfo = data;
-+ unsigned long blksize_bits = inode->i_sb->s_blocksize_bits;
++ unsigned char blksize_bits = inode->i_sb->s_blocksize_bits;
+ __u64 logical;
+ __u64 physical;
+ __u64 length;
+ *
+ * XXX this might miss a single-block extent at EXT_MAX_BLOCK
+ */
-+ if (logical + length - 1 == EXT_MAX_BLOCK ||
-+ ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK)
++ if (ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK ||
++ newex->ec_block + newex->ec_len - 1 == EXT_MAX_BLOCK)
+ flags |= FIEMAP_EXTENT_LAST;
+
+ error = fiemap_fill_next_extent(fieinfo, logical, physical,