Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bcachefs: Drop redundant btree_path_downgrade()s

If a path doesn't have any active references, we shouldn't downgrade it;
it'll either be reused, possibly with intent refs again, or dropped at
bch2_trans_begin() time.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

+2 -1
+2 -1
fs/bcachefs/btree_locking.c
··· 747 747 return; 748 748 749 749 trans_for_each_path(trans, path, i) 750 - bch2_btree_path_downgrade(trans, path); 750 + if (path->ref) 751 + bch2_btree_path_downgrade(trans, path); 751 752 } 752 753 753 754 int bch2_trans_relock(struct btree_trans *trans)