Commit fe596ca3 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: use btrfs_tree_read_lock in btrfs_search_slot

We no longer use recursion, so
__btrfs_tree_read_lock(BTRFS_NESTING_NORMAL) == btrfs_tree_read_lock.
Replace this call with the simple helper.
Reviewed-by: default avatarFilipe Manana <fdmanana@suse.com>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 1bb96598
......@@ -2802,7 +2802,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root *root,
btrfs_tree_lock(b);
p->locks[level] = BTRFS_WRITE_LOCK;
} else {
__btrfs_tree_read_lock(b, BTRFS_NESTING_NORMAL, 0);
btrfs_tree_read_lock(b);
p->locks[level] = BTRFS_READ_LOCK;
}
p->nodes[level] = b;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment