bcachefs: Improve btree_key_cache_flush_pos()
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 12 Jan 2022 05:49:23 +0000 (00:49 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:23 +0000 (17:09 -0400)
commita9c0b125d8162bf648f7a004f70d4cff6e84ddd9
tree7f31f104a3990f81d89be13eb18604c67377d1bd
parent80bf2f345411b9952a984b6105cd860500b01228
bcachefs: Improve btree_key_cache_flush_pos()

btree_key_cache_flush_pos() uses BTREE_ITER_CACHED_NOFILL - but it
wasn't checking for !ck->valid. It does check for the entry being dirty,
so it shouldn't matter, but this refactor it a bit and adds and
assertion.

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