aboutsummaryrefslogtreecommitdiffstats
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 04:53:00 -0500
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 @@
37 37
38int btrfs_tree_lock(struct extent_buffer *eb) 38int btrfs_tree_lock(struct extent_buffer *eb)
39{ 39{
40 int i;
41
42 if (mutex_trylock(&eb->mutex))
43 return 0;
44 for (i = 0; i < 512; i++) {
45 cpu_relax();
46 if (mutex_trylock(&eb->mutex))
47 return 0;
48 }
49 cpu_relax();
50 mutex_lock_nested(&eb->mutex, BTRFS_MAX_LEVEL - btrfs_header_level(eb)); 40 mutex_lock_nested(&eb->mutex, BTRFS_MAX_LEVEL - btrfs_header_level(eb));
51 return 0; 41 return 0;
52} 42}