ext4: Issue the discard operation *before* releasing the blocks to be reused
commit43a1669ae07d79d6462f99bccf649dc3ae39e451
authorTheodore Ts'o <tytso@mit.edu>
Mon, 31 May 2010 02:49:42 +0000 (30 22:49 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:21:17 +0000 (2 10:21 -0700)
tree54d2ce82647a8100024a59567aadb4169cc80bbf
parentadaf14bef627b08726d0f91aeff2594e21451010
ext4: Issue the discard operation *before* releasing the blocks to be reused

commit b90f687018e6d6c77d981b09203780f7001407e5 upstream (as of v2.6.34-rc6)

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/mballoc.c