aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorAshish Sangwan <ashishsangwan2@gmail.com>2012-07-22 22:49:08 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-07-22 22:49:08 -0400
commit968dee77220768a5f52cf8b21d0bdb73486febef (patch)
treed9cb2adcb71b5b00fed42dcb6c7fc55f57e0b7ce /fs/ext4/inode.c
parentext4: remove unnecessary argument from __ext4_handle_dirty_metadata() (diff)
downloadlinux-dev-968dee77220768a5f52cf8b21d0bdb73486febef.tar.xz
linux-dev-968dee77220768a5f52cf8b21d0bdb73486febef.zip
ext4: fix hole punch failure when depth is greater than 0
Whether to continue removing extents or not is decided by the return value of function ext4_ext_more_to_rm() which checks 2 conditions: a) if there are no more indexes to process. b) if the number of entries are decreased in the header of "depth -1". In case of hole punch, if the last block to be removed is not part of the last extent index than this index will not be deleted, hence the number of valid entries in the extent header of "depth - 1" will remain as it is and ext4_ext_more_to_rm will return 0 although the required blocks are not yet removed. This patch fixes the above mentioned problem as instead of removing the extents from the end of file, it starts removing the blocks from the particular extent from which removing blocks is actually required and continue backward until done. Signed-off-by: Ashish Sangwan <ashish.sangwan2@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com> Reviewed-by: Lukas Czerner <lczerner@redhat.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/ext4/inode.c')
0 files changed, 0 insertions, 0 deletions