mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
bcachefs: Update path microoptimizations
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
0a426c3239
commit
fdfab313b6
2 changed files with 5 additions and 4 deletions
|
@ -211,7 +211,7 @@ static inline void bch2_btree_node_lock_write(struct btree *b, struct btree_iter
|
|||
EBUG_ON(iter->l[b->c.level].b != b);
|
||||
EBUG_ON(iter->l[b->c.level].lock_seq != b->c.lock.state.seq);
|
||||
|
||||
if (!six_trylock_write(&b->c.lock))
|
||||
if (unlikely(!six_trylock_write(&b->c.lock)))
|
||||
__bch2_btree_node_lock_write(b, iter);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ inline void bch2_btree_node_lock_for_insert(struct bch_fs *c, struct btree *b,
|
|||
{
|
||||
bch2_btree_node_lock_write(b, iter);
|
||||
|
||||
if (btree_node_just_written(b) &&
|
||||
if (unlikely(btree_node_just_written(b)) &&
|
||||
bch2_btree_post_write_cleanup(c, b))
|
||||
bch2_btree_iter_reinit_node(iter, b);
|
||||
|
||||
|
@ -605,8 +605,9 @@ static inline int do_btree_insert_at(struct btree_trans *trans,
|
|||
goto out_clear_replicas;
|
||||
}
|
||||
|
||||
trans_for_each_update(trans, i)
|
||||
btree_insert_entry_checks(trans, i);
|
||||
if (IS_ENABLED(CONFIG_BCACHEFS_DEBUG))
|
||||
trans_for_each_update(trans, i)
|
||||
btree_insert_entry_checks(trans, i);
|
||||
bch2_btree_trans_verify_locks(trans);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue