From: Chris Mason Date: Wed, 14 Jan 2009 18:40:46 +0000 (-0500) Subject: Btrfs: stop spinning on mutex_trylock and let the adaptive code spin for us X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=cf47b8f3d96b0b8b10b557444a28b3ca4024ff82;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Ingo Molnar --- diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index 39bae7761db..40ba8e8962f 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; }