ext4: fix fsx truncate failure
authorAllison Henderson <achender@linux.vnet.ibm.com>
Wed, 7 Sep 2011 01:49:44 +0000 (21:49 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 7 Sep 2011 01:49:44 +0000 (21:49 -0400)
commit189e868fa8fdca702eb9db9d8afc46b5cb9144c9
tree5b226cfe59cc9351b9d870a5c31cdfe4f5544652
parentdecbd919f4bb9cb698486880c026c4104b13d3c3
ext4: fix fsx truncate failure

While running extended fsx tests to verify the first
two patches, a similar bug was also found in the
truncate operation.

This bug happens because the truncate routine only zeros
the unblock aligned portion of the last page.  This means
that the block aligned portions of the page appearing after
i_size are left unzeroed, and the buffer heads still mapped.

This bug is corrected by using ext4_discard_partial_page_buffers
in the truncate routine to zero the partial page and unmap
the buffer headers.

Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c
fs/ext4/indirect.c