bcachefs: Fix for_each_btree_key2()
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 16 Nov 2022 04:17:55 +0000 (23:17 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:46 +0000 (17:09 -0400)
commit3bce13837395f1af2fd585ef6dd4b54d80c2d1fb
tree1b87bfd71fe17fccb204f281a87f3d07cda28b33
parent4fcdd6ec345e1aeed23fbdbe53d62965c1a79b99
bcachefs: Fix for_each_btree_key2()

Previously, when we exited from the loop body with a break statement
_ret wouldn't have been assigned to yet, and we could spuriously return
a transaction restart error.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_iter.h