summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/locking.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/locking.c')
-rw-r--r--fs/btrfs/locking.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c
index 01a9ac2be3f7..27a02376ab14 100644
--- a/fs/btrfs/locking.c
+++ b/fs/btrfs/locking.c
@@ -37,7 +37,7 @@ int btrfs_tree_lock(struct extent_buffer *eb)
return 0;
}
cpu_relax();
- mutex_lock(&eb->mutex);
+ mutex_lock_nested(&eb->mutex, BTRFS_MAX_LEVEL - btrfs_header_level(eb));
return 0;
}