Skip to content

Commit

Permalink
bcachefs: btree_node_unlock() assert
Browse files Browse the repository at this point in the history
we have a separate helper for releasing write locks

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
  • Loading branch information
Kent Overstreet committed Jun 13, 2024
1 parent c748270 commit cad2642
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/bcachefs/btree_locking.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ static inline void btree_node_unlock(struct btree_trans *trans,
int lock_type = btree_node_locked_type(path, level);

EBUG_ON(level >= BTREE_MAX_DEPTH);
EBUG_ON(lock_type == BTREE_NODE_WRITE_LOCKED);

if (lock_type != BTREE_NODE_UNLOCKED) {
six_unlock_type(&path->l[level].b->c.lock, lock_type);
Expand Down

0 comments on commit cad2642

Please sign in to comment.