Commit fb975d14 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Drop unnecessary rcu_read_lock()

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent fdfab313
......@@ -675,10 +675,7 @@ struct btree *bch2_btree_node_get(struct bch_fs *c, struct btree_iter *iter,
EBUG_ON(!btree_node_locked(iter, level + 1));
EBUG_ON(level >= BTREE_MAX_DEPTH);
retry:
rcu_read_lock();
b = btree_cache_find(bc, k);
rcu_read_unlock();
if (unlikely(!b)) {
/*
* We must have the parent locked to call bch2_btree_node_fill(),
......@@ -879,10 +876,7 @@ void bch2_btree_node_prefetch(struct bch_fs *c, struct btree_iter *iter,
BUG_ON(!btree_node_locked(iter, level + 1));
BUG_ON(level >= BTREE_MAX_DEPTH);
rcu_read_lock();
b = btree_cache_find(bc, k);
rcu_read_unlock();
if (b)
return;
......
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