diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-08 15:25:12 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-14 19:00:15 -0400 |
commit | 71fdc0b5a678766e874c5001e8bc83bde5931655 (patch) | |
tree | f963a1a79d16368f0b14c45488db1215d40b0e4c /fs/bcachefs/btree_locking.h | |
parent | dd3995a6a4fcf041297d73fb7a12c6edde339986 (diff) | |
download | lwn-71fdc0b5a678766e874c5001e8bc83bde5931655.tar.gz lwn-71fdc0b5a678766e874c5001e8bc83bde5931655.zip |
bcachefs: btree_node_unlock() assert
we have a separate helper for releasing write locks
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index 75a6274c7d27..8f5f1973c7d8 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -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); |