diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-17 13:03:11 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:44 +0200 |
commit | 307e3c13192002f684bdfc23865a57274e6bb4ad (patch) | |
tree | 56645bb36c8efcec63ed0aaa4f6db836ad5b81e2 /fs/bcachefs/debug.c | |
parent | bcachefs: Split out __btree_path_up_until_good_node() (diff) | |
download | linux-307e3c13192002f684bdfc23865a57274e6bb4ad.tar.xz linux-307e3c13192002f684bdfc23865a57274e6bb4ad.zip |
bcachefs: Optimize bch2_trans_init()
Now we store the transaction's fn idx in a local variable, instead of
redoing the lookup every time we call bch2_trans_init().
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/debug.c')
-rw-r--r-- | fs/bcachefs/debug.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c index 7abc707d2f38..a9e4180d6a80 100644 --- a/fs/bcachefs/debug.c +++ b/fs/bcachefs/debug.c @@ -638,11 +638,11 @@ static ssize_t lock_held_stats_read(struct file *file, char __user *buf, if (!i->size) break; - if (i->iter == ARRAY_SIZE(c->btree_transaction_fns) || - !c->btree_transaction_fns[i->iter]) + if (i->iter == ARRAY_SIZE(bch2_btree_transaction_fns) || + !bch2_btree_transaction_fns[i->iter]) break; - prt_printf(&i->buf, "%s: ", c->btree_transaction_fns[i->iter]); + prt_printf(&i->buf, "%s: ", bch2_btree_transaction_fns[i->iter]); prt_newline(&i->buf); printbuf_indent_add(&i->buf, 2); |