From: Chris Mason Date: Thu, 17 Jul 2008 16:54:40 +0000 (-0400) Subject: Add a per-inode lock around btrfs_drop_extents X-Git-Tag: v2.6.29-rc1~27^2~9^2~55^2~56^2~30^2~122 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee6e6504e147a59a9f4d582662c105e9d72ae638;p=pandora-kernel.git Add a per-inode lock around btrfs_drop_extents btrfs_drop_extents is always called with a range lock held on the inode. But, it may operate on extents outside that range as it drops and splits them. This patch adds a per-inode mutex that is held while calling btrfs_drop_extents and while inserting new extents into the tree. It prevents races from two procs working against adjacent ranges in the tree. Signed-off-by: Chris Mason --- Reading git-diff-tree failed