bcachefs: Convert bch2_do_discards_work() to for_each_btree_key2()
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 17 Jul 2022 04:31:40 +0000 (00:31 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:36 +0000 (17:09 -0400)
commit4910a9506cff4760d56e8a362619dee3319bee8b
tree8140e8a6e24cc7d6ab3eaec5e8e392e0ccc393b8
parent8ef983139940439b3c169ea90dbb8c21e5dcadd3
bcachefs: Convert bch2_do_discards_work() to for_each_btree_key2()

The new for_each_btree_key2() macro handles transaction retries,
allowing us to avoid nested transactions - which we want to avoid since
they're tricky to do completely correctly and upcoming assertions are
going to be checking for that.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_background.c