diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-10 23:22:46 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-22 02:07:28 -0400 |
commit | a97f90407d3acc4eb025b69afd65f7f56d54c5be (patch) | |
tree | add82a84acff9019c73926071341448e36d18e82 /fs/bcachefs/btree_locking.h | |
parent | 9bc9b0a57367fdba41a76da7838ab8185d6ef67f (diff) |
bcachefs: bch2_btree_path_upgrade_norestart()bcachefs-testing-2
btree_path_get_locks() leaves a path unlocked (and with error pointers
for nodes) on failure - this used to be necessary for path_traverse() to
correctly lock all needed levels.
But it's not needed anymore, and we need a new helper that doesn't break
future locking invariants and leave us in a bad state (unlocked) when
used on a should_be_locked path, because bch2_path_get() has no way of
returning a transaction restart.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_locking.h')
-rw-r--r-- | fs/bcachefs/btree_locking.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index 7c07f9fa9add..7e9ab778efd0 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -373,9 +373,10 @@ static inline bool bch2_btree_node_relock_notrace(struct btree_trans *trans, /* upgrade */ -bool bch2_btree_path_upgrade_noupgrade_sibs(struct btree_trans *, - struct btree_path *, unsigned, - struct get_locks_fail *); +bool bch2_btree_path_upgrade_nounlock(struct btree_trans *, + struct btree_path *, unsigned); +bool bch2_btree_path_upgrade_norestart(struct btree_trans *, + struct btree_path *, unsigned); bool __bch2_btree_path_upgrade(struct btree_trans *, struct btree_path *, unsigned, |