summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_locking.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-04-06 04:32:06 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-05-09 00:29:18 +0300
commit00589cadb1fb12548e096a29b1b9c0ccb313f2fa (patch)
treebf0d5b3a257234ff037837ae2593c5b414dd66d8 /fs/bcachefs/btree_locking.c
parent5577881455cdfe0c39781e43215138faf5ed2118 (diff)
downloadlinux-00589cadb1fb12548e096a29b1b9c0ccb313f2fa.tar.xz
bcachefs: bch2_btree_path_to_text()
Long form version of bch2_btree_path_to_text() - useful in error messages and tracepoints. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_locking.c')
-rw-r--r--fs/bcachefs/btree_locking.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_locking.c b/fs/bcachefs/btree_locking.c
index 4ee4855395b9..8d1c4f78db5e 100644
--- a/fs/bcachefs/btree_locking.c
+++ b/fs/bcachefs/btree_locking.c
@@ -836,6 +836,11 @@ void bch2_btree_path_verify_locks(struct btree_path *path)
{
unsigned l;
+ /*
+ * A path may be uptodate and yet have nothing locked if and only if
+ * there is no node at path->level, which generally means we were
+ * iterating over all nodes and got to the end of the btree
+ */
if (!path->nodes_locked) {
BUG_ON(path->uptodate == BTREE_ITER_UPTODATE &&
btree_path_node(path, path->level));