mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 12:52:40 -04:00
bcachefs: bch2_trans_unlock_noassert()
This fixes a spurious assert in the btree node read path. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
@@ -744,7 +744,7 @@ static noinline struct btree *bch2_btree_node_fill(struct btree_trans *trans,
|
||||
|
||||
/* Unlock before doing IO: */
|
||||
if (trans && sync)
|
||||
bch2_trans_unlock(trans);
|
||||
bch2_trans_unlock_noassert(trans);
|
||||
|
||||
bch2_btree_node_read(c, b, sync);
|
||||
|
||||
|
||||
@@ -715,6 +715,14 @@ int bch2_trans_relock_notrace(struct btree_trans *trans)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void bch2_trans_unlock_noassert(struct btree_trans *trans)
|
||||
{
|
||||
struct btree_path *path;
|
||||
|
||||
trans_for_each_path(trans, path)
|
||||
__bch2_btree_path_unlock(trans, path);
|
||||
}
|
||||
|
||||
void bch2_trans_unlock(struct btree_trans *trans)
|
||||
{
|
||||
struct btree_path *path;
|
||||
|
||||
@@ -21,6 +21,8 @@ void bch2_assert_btree_nodes_not_locked(void);
|
||||
static inline void bch2_assert_btree_nodes_not_locked(void) {}
|
||||
#endif
|
||||
|
||||
void bch2_trans_unlock_noassert(struct btree_trans *);
|
||||
|
||||
static inline bool is_btree_node(struct btree_path *path, unsigned l)
|
||||
{
|
||||
return l < BTREE_MAX_DEPTH && !IS_ERR_OR_NULL(path->l[l].b);
|
||||
|
||||
Reference in New Issue
Block a user