]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix end of region partial cluster handling
authorEric Whitney <enwlinux@gmail.com>
Sun, 23 Nov 2014 05:59:39 +0000 (00:59 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 23 Nov 2014 05:59:39 +0000 (00:59 -0500)
commit8348a8e8e9fb6dd6f9c4aff8e3fe9b0b8a58044d
treed5c5effc3d6364c00ed9389c4299a4bf1890a834
parent0fcd7effe857d3547da073ef7e0550491fbe28e5
ext4: fix end of region partial cluster handling

ext4_ext_remove_space() can incorrectly free a partial_cluster if
EAGAIN is encountered while truncating or punching.  Extent removal
should be retried in this case.

It also fails to free a partial cluster when the punched region begins
at the start of a file on that unaligned cluster and where the entire
file has not been punched.  Remove the requirement that all blocks in
the file must have been freed in order to free the partial cluster.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c