]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 13 Jul 2016 07:20:08 +0000 (00:20 -0700)
commite46c50dfba69f0ed77257fbba2450a5f9cfa8b88
tree999d2923902276c9c02d6974beb0c23de5e5f013
parentad21be553352889fd90cdadd1835e5ad8e6314aa
ext4: only call ext4_truncate when size <= isize

Orabug: 23598757

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>
(cherry picked from commit 3da40c7b089810ac9cf2bb1e59633f619f3a7312)
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
 Conflicts:
fs/ext4/inode.c
fs/ext4/inode.c