mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
ac6e60ee40
commit
cf47b8f3d9
1 changed files with 0 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue