bcachefs: Fix unused variable warning when !BCACHEFS_DEBUG

Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Christopher James Halse Rogers 2021-06-25 11:45:19 +10:00 committed by Kent Overstreet
parent 077ed08ec7
commit 729608a606

View File

@ -1549,7 +1549,9 @@ struct btree *bch2_btree_iter_next_node(struct btree_iter *iter)
static void btree_iter_set_search_pos(struct btree_iter *iter, struct bpos new_pos)
{
#ifdef CONFIG_BCACHEFS_DEBUG
struct bpos old_pos = iter->real_pos;
#endif
int cmp = bpos_cmp(new_pos, iter->real_pos);
unsigned l = iter->level;