]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bcachefs: Drop unnecessary rcu_read_lock()
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 21 Sep 2019 20:30:15 +0000 (16:30 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:27 +0000 (17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_cache.c

index ea775d91de6769d2d050144946ad71ad21f82610..eb38fa50e05425c1779150e411c5ae6d78245104 100644 (file)
@@ -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;