ext4: Issue the discard operation *before* releasing the blocks to be reused
authorTheodore Ts'o <tytso@mit.edu>
Tue, 20 Apr 2010 20:51:59 +0000 (16:51 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 20 Apr 2010 20:51:59 +0000 (16:51 -0400)
commitb90f687018e6d6c77d981b09203780f7001407e5
treed2e2b36b4d88d2098000fcb56cc56e5d2e74fdf1
parentfd2dd9fbaf9e498ec63eef298921e36556f7214c
ext4: Issue the discard operation *before* releasing the blocks to be reused

Otherwise, we can end up having data corruption because the blocks
could get reused and then discarded!

https://bugzilla.kernel.org/show_bug.cgi?id=15579

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/mballoc.c