Commit c298fd7d authored by Kent Overstreet's avatar Kent Overstreet

bcachefs; Mark __bch2_trans_iter_init as inline

This function is fairly small and only used in two places: one very hot,
the other cold, so it should definitely be inlined.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 25b4b330
......@@ -2581,12 +2581,12 @@ void bch2_trans_iter_exit(struct btree_trans *trans, struct btree_iter *iter)
iter->key_cache_path = NULL;
}
static void __bch2_trans_iter_init(struct btree_trans *trans,
struct btree_iter *iter,
enum btree_id btree_id, struct bpos pos,
unsigned locks_want,
unsigned depth,
unsigned flags)
static inline void __bch2_trans_iter_init(struct btree_trans *trans,
struct btree_iter *iter,
enum btree_id btree_id, struct bpos pos,
unsigned locks_want,
unsigned depth,
unsigned flags)
{
if (trans->restarted)
panic("bch2_trans_iter_init(): in transaction restart, %s by %pS\n",
......
......@@ -36,8 +36,7 @@ static struct btree_path *get_unlocked_mut_path(struct btree_trans *trans,
struct btree_path *path;
path = bch2_path_get(trans, btree_id, pos, level + 1, level,
BTREE_ITER_NOPRESERVE|
BTREE_ITER_INTENT);
BTREE_ITER_NOPRESERVE|BTREE_ITER_INTENT);
path = bch2_btree_path_make_mut(trans, path, true);
bch2_btree_path_downgrade(trans, path);
__bch2_btree_path_unlock(trans, path);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment