diff options
author | Ashish Sangwan | 2012-07-22 22:49:08 -0400 |
---|---|---|
committer | Theodore Ts'o | 2012-07-22 22:49:08 -0400 |
commit | 968dee77220768a5f52cf8b21d0bdb73486febef (patch) | |
tree | d9cb2adcb71b5b00fed42dcb6c7fc55f57e0b7ce /ipc/mq_sysctl.c | |
parent | b50924c2c606eccfe0caef39beb0929dfa9a1a81 (diff) |
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 'ipc/mq_sysctl.c')
0 files changed, 0 insertions, 0 deletions