]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: only call ext4_truncate when size <= isize
authorJosef Bacik <jbacik@fb.com>
Mon, 22 Jun 2015 04:31:26 +0000 (00:31 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 22 Jun 2015 04:31:26 +0000 (00:31 -0400)
commitffe1473dd30f6b41979c4334ed47c0de21a59225
treee1649f9e7cbe2ae93c7e1cd82ae21fbdef8342a6
parent56e336c3123e955db559c512e5205d9669a40c6a
ext4: only call ext4_truncate when size <= isize

At LSF we decided that if we truncate up from isize we shouldn't trim
fallocated blocks that were fallocated with KEEP_SIZE and are past the
new i_size.  This patch fixes ext4 to do this.

[ Completely reworked patch so that i_disksize would actually get set
  when truncating up.  Also reworked the code for handling truncate so
  that it's easier to handle. -- tytso ]

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
fs/ext4/inode.c