mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 15:51:40 -04:00
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: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user