ext4: Drop EXT4_GET_BLOCKS_UPDATE_RESERVE_SPACE flag
commit
1296cc85c26e94eb865d03f82140f27d598de467 upstream (as of v2.6.33-rc6)
We should update reserve space if it is delalloc buffer
and that is indicated by EXT4_GET_BLOCKS_DELALLOC_RESERVE flag.
So use EXT4_GET_BLOCKS_DELALLOC_RESERVE in place of
EXT4_GET_BLOCKS_UPDATE_RESERVE_SPACE
[ Stable note: This fixes a corruption cuased by the following
reproduction case:
rm -f $TEST_FN
touch $TEST_FN
fallocate -n -o 656712 -l 858907 $TEST_FN
dd if=/dev/zero of=$TEST_FN conv=notrunc bs=1 seek=
1011020 count=36983
sync
dd if=/dev/zero of=$TEST_FN conv=notrunc bs=1 seek=332121 count=24005
dd if=/dev/zero of=$TEST_FN conv=notrunc bs=1 seek=
1040179 count=93319
If the filesystem is then unmounted and e2fsck run forced, the
i_blocks field for the file $TEST_FN will be found to be incorrect. ]
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>