summaryrefslogtreecommitdiff
path: root/fs/bcachefs/debug.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-10-17 14:03:11 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:44 +0300
commit307e3c13192002f684bdfc23865a57274e6bb4ad (patch)
tree56645bb36c8efcec63ed0aaa4f6db836ad5b81e2 /fs/bcachefs/debug.c
parent29aa78f15e1bbd984cc14f395544d62b6f0a2a33 (diff)
downloadlinux-307e3c13192002f684bdfc23865a57274e6bb4ad.tar.xz
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.c6
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);