]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't use spin_is_contended
authorChris Mason <chris.mason@oracle.com>
Mon, 9 Feb 2009 21:22:03 +0000 (16:22 -0500)
committerChris Mason <chris.mason@oracle.com>
Mon, 9 Feb 2009 21:22:03 +0000 (16:22 -0500)
commit8688440e8eea3b7c3d37632e6d27efd220b25b67
treee34185c911cb50b0ade04f804056ffbe2a6e04ae
parent2e362cd0d20c6ccc3b0c8e6a126ecec9a07908a5
Btrfs: don't use spin_is_contended

Btrfs was using spin_is_contended to see if it should drop locks before
doing extent allocations during btrfs_search_slot.  The idea was to avoid
expensive searches in the tree unless the lock was actually contended.

But, spin_is_contended is specific to the ticket spinlocks on x86, so this
is causing compile errors everywhere else.

In practice, the contention could easily appear some time after we started
doing the extent allocation, and it makes more sense to always drop the lock
instead.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.c
fs/btrfs/locking.c
fs/btrfs/locking.h