ext4: Fix hueristic which avoids group preallocation for closed files
commit0be3bd025b9893a0f2ed3d1cbeb06d7abc0e27df
authorTheodore Ts'o <tytso@mit.edu>
Mon, 28 Sep 2009 04:06:20 +0000 (28 00:06 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 16:06:53 +0000 (14 08:06 -0800)
tree897e6c410e9488acce72ed4f5630ac79786a3a42
parenta6c92a88b556da1073e03d6936ae70c2c045421c
ext4: Fix hueristic which avoids group preallocation for closed files

(cherry picked from commit 71780577306fd1e76c7a92e3b308db624d03adb9)

The hueristic was designed to avoid using locality group preallocation
when writing the last segment of a closed file.  Fix it by move
setting size to the maximum of size and isize until after we check
whether size == isize.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/mballoc.c