summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-01-14 13:40:46 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-15 10:53:00 +0100
commitcf47b8f3d96b0b8b10b557444a28b3ca4024ff82 (patch)
tree60c33e85ea5d5707f8fac98f57ab393202bfe4ea
parentac6e60ee405aa3bf718f7fe4cb01b7ee0b8877ec (diff)
Btrfs: stop spinning on mutex_trylock and let the adaptive code spin for us
Mutexes now spin internally and the btrfs spin is no longer required for performance. Signed-off-by: Chris Mason <chris.mason@oracle.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--fs/btrfs/locking.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c
index 39bae7761db6..40ba8e8962f8 100644
--- a/fs/btrfs/locking.c
+++ b/fs/btrfs/locking.c
@@ -37,16 +37,6 @@
int btrfs_tree_lock(struct extent_buffer *eb)
{
- int i;
-
- if (mutex_trylock(&eb->mutex))
- return 0;
- for (i = 0; i < 512; i++) {
- cpu_relax();
- if (mutex_trylock(&eb->mutex))
- return 0;
- }
- cpu_relax();
mutex_lock_nested(&eb->mutex, BTRFS_MAX_LEVEL - btrfs_header_level(eb));
return 0;
}