From: Yan Zheng Date: Thu, 30 Oct 2008 18:19:50 +0000 (-0400) Subject: Btrfs: Fix bookend extent race v2 X-Git-Tag: v2.6.29-rc1~27^2~9^2~55^2~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6643558db29006825dbb10012b3f8890aca4bcd5;p=pandora-kernel.git Btrfs: Fix bookend extent race v2 When dropping middle part of an extent, btrfs_drop_extents truncates the extent at first, then inserts a bookend extent. Since truncation and insertion can't be done atomically, there is a small period that the bookend extent isn't in the tree. This causes problem for functions that search the tree for file extent item. The way to fix this is lock the range of the bookend extent before truncation. Signed-off-by: Yan Zheng --- Reading git-diff-tree failed