]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ext4/indirect.c
ext4: Fix block zeroing when punching holes in indirect block files
[karo-tx-linux.git] / fs / ext4 / indirect.c
index f85bafd474dc8cd9dee7d743d48047b50589068a..6f3bb55567b63ef5e6e7285195fa46b21e3dc33c 100644 (file)
@@ -1335,8 +1335,8 @@ static int free_hole_blocks(handle_t *handle, struct inode *inode,
                if (level == 0 ||
                    (bh && all_zeroes((__le32 *)bh->b_data,
                                      (__le32 *)bh->b_data + addr_per_block))) {
-                       ext4_free_data(handle, inode, parent_bh, &blk, &blk+1);
-                       *i_data = 0;
+                       ext4_free_data(handle, inode, parent_bh,
+                                      i_data, i_data + 1);
                }
                brelse(bh);
                bh = NULL;