From: Akira Fujita Date: Thu, 4 Mar 2010 05:31:06 +0000 (-0500) Subject: ext4: Fix insertion point of extent in mext_insert_across_blocks() X-Git-Tag: v2.6.34-rc1~199^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fd5249aa36fad98c9fd5edced352939e54f9324;p=pandora-kernel.git ext4: Fix insertion point of extent in mext_insert_across_blocks() If the leaf node has 2 extent space or fewer and EXT4_IOC_MOVE_EXT ioctl is called with the file offset where after the 2nd extent covers, mext_insert_across_blocks() always tries to insert extent into the first extent. As a result, the file gets corrupted because of wrong extent order. The patch fixes this problem. Signed-off-by: Akira Fujita Signed-off-by: "Theodore Ts'o" --- Reading git-diff-tree failed