bcachefs: Fix spurious transaction restarts
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 28 Oct 2020 18:18:18 +0000 (14:18 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:45 +0000 (17:08 -0400)
commitdcf141b9e13d261629806aa37e0fa7769d38b789
tree6b3cc275777d538d4b53277ad09348b60b7d3a83
parenta301dc38efa178e900a59ce7f03c1e81123c0919
bcachefs: Fix spurious transaction restarts

The check for whether locking a btree node would deadlock was wrong - we
have to check that interior nodes are locked before descendents, but
this check was wrong when consider cached vs. non cached iterators.

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