From: Theodore Ts'o Date: Thu, 14 Aug 2008 01:44:34 +0000 (-0400) Subject: ext4: Fix potential truncate BUG due to i_prealloc_list being non-empty X-Git-Tag: v2.6.27-rc5~46^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4df2030858bde986cb6ff2e4b45945f84649e32;p=pandora-kernel.git ext4: Fix potential truncate BUG due to i_prealloc_list being non-empty We need to call ext4_discard_reservation() earlier in ext4_truncate(), to avoid a BUG() in ext4_mb_return_to_preallocation(), which is called (ultimately) by ext4_free_blocks(). So we must ditch the blocks on i_prealloc_list before we start freeing the data blocks. Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed