]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bcachefs: trans_for_each_path() no longer uses path->idx
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 11 Dec 2023 04:37:45 +0000 (23:37 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Jan 2024 16:47:43 +0000 (11:47 -0500)
commitccb7b08fbbb85e9b0bb2867497d98172a5737ad5
tree9cc04e7750d9226ca3160b7837e8e76ae45f111a
parent4c5289e6323ca9d0d46b3663ace2fb44bb2594b7
bcachefs: trans_for_each_path() no longer uses path->idx

path->idx is now a code smell: we should be using path_idx_t, since it's
stable across btree path reallocation.

This is also a bit faster, using the same loop counter vs. fetching
path->idx from each path we iterate over.

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