1 ext4: remove uneeded i_size handling
3 From: Allison Henderson <achender@linux.vnet.ibm.com>
5 This patch removes a fix that is now being addressed in another
6 patch. The code being removed also made the assumption that a
7 hole cannot exceed or start after i_size, but since this is no
8 longer the case and the source of the bug has been corrected in
9 a different patch, this code is no longer needed.
11 The removed code initally corrected a bug found in fsx,
12 where garbage data would appear in the last page after i_size, when
13 ever a hole ended in the same page as i_size. The cause of the cause
14 of the garbage data has been fixed in patch
15 "[PATCH 2/2] ext4: let ext4_bio_write_page handle EOF correctly"
17 This patch set has been tested with fsx on a 1k block size, and
18 successfully passed 24 hours.
20 Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
21 Signed-off-by: Lukas Czerner <lczerner@redhat.com>
22 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
24 fs/ext4/extents.c | 19 -------------------
25 1 files changed, 0 insertions(+), 19 deletions(-)
27 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
28 index 7d4f2cb..846584d 100644
29 --- a/fs/ext4/extents.c
30 +++ b/fs/ext4/extents.c
31 @@ -4767,25 +4767,6 @@ int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length)
36 - * If i_size is contained in the last page, we need to
37 - * unmap and zero the partial page after i_size
39 - if (inode->i_size >> PAGE_CACHE_SHIFT == last_page &&
40 - inode->i_size % PAGE_CACHE_SIZE != 0) {
42 - page_len = PAGE_CACHE_SIZE -
43 - (inode->i_size & (PAGE_CACHE_SIZE - 1));
46 - err = ext4_discard_partial_page_buffers(handle,
47 - mapping, inode->i_size, page_len, 0);
54 first_block = (offset + sb->s_blocksize - 1) >>
55 EXT4_BLOCK_SIZE_BITS(sb);
56 stop_block = (offset + length) >> EXT4_BLOCK_SIZE_BITS(sb);