From: Josef Bacik Date: Wed, 8 Jun 2011 18:45:50 +0000 (-0400) Subject: Btrfs: don't map extent buffer if path->skip_locking is set X-Git-Tag: v3.0-rc3~9^2~3^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad3e34bba4b64ab8e1f5ea1a17768e1a0d9648ea;p=pandora-kernel.git Btrfs: don't map extent buffer if path->skip_locking is set Arne's scrub stuff exposed a problem with mapping the extent buffer in reada_for_search. He searches the commit root with multiple threads and with skip_locking set, so we can race and overwrite node->map_token since node isn't locked. So fix this so that we only map the extent buffer if we don't already have a map_token and skip_locking isn't set. Without this patch scrub would panic almost immediately, with the patch it doesn't panic anymore. Thanks, Reported-by: Arne Jansen Signed-off-by: Josef Bacik --- Reading git-diff-tree failed