diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-10 22:13:01 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-10 22:15:00 -0400 |
commit | 17d1c4f4fe29453fbb4087eb5de8aa6f9e6605c7 (patch) | |
tree | 84a0fb52242d7890ff6b2eb8c449b696f2edd844 /libbcachefs/btree_locking.c | |
parent | 7a66cf70c5d8b02f84595e5648c12e7422e4d03e (diff) |
Update bcachefs sources to ed6b7f81a7 six locks: Disable percpu read lock mode in userspace
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/btree_locking.c')
-rw-r--r-- | libbcachefs/btree_locking.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libbcachefs/btree_locking.c b/libbcachefs/btree_locking.c index a17256fc..5b290324 100644 --- a/libbcachefs/btree_locking.c +++ b/libbcachefs/btree_locking.c @@ -254,6 +254,7 @@ int bch2_check_for_deadlock(struct btree_trans *trans, struct printbuf *cycle) struct trans_waiting_for_lock *top; struct btree_bkey_cached_common *b; struct btree_path *path; + unsigned path_idx; int ret; if (trans->lock_must_abort) { @@ -272,12 +273,12 @@ next: top = &g.g[g.nr - 1]; - trans_for_each_path_from(top->trans, path, top->path_idx) { + trans_for_each_path_safe_from(top->trans, path, path_idx, top->path_idx) { if (!path->nodes_locked) continue; - if (top->path_idx != path->idx) { - top->path_idx = path->idx; + if (path_idx != top->path_idx) { + top->path_idx = path_idx; top->level = 0; top->lock_start_time = 0; } |