bcachefs: fix setting btree_node_accessed()

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2020-02-26 17:25:13 -05:00 committed by Kent Overstreet
parent 72141e1f4f
commit 7f81d4cf69

View file

@ -748,7 +748,7 @@ struct btree *bch2_btree_node_get(struct bch_fs *c, struct btree_iter *iter,
}
/* avoid atomic set bit if it's not needed: */
if (btree_node_accessed(b))
if (!btree_node_accessed(b))
set_btree_node_accessed(b);
if (unlikely(btree_node_read_error(b))) {