------------[ cut here ]------------
kernel BUG at fs/bcachefs/journal.c:105!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 1040 Comm: kworker/u4:8 Not tainted 6.13.0-rc7-syzkaller-00102-gce69b4019001 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: btree_update btree_interior_update_work
RIP: 0010:journal_seq_to_buf fs/bcachefs/journal.c:105 [inline]
RIP: 0010:bch2_journal_noflush_seq+0x320/0x330 fs/bcachefs/journal.c:819
Code: e8 b5 6b 5c fd 48 8b 3c 24 e8 4c b5 88 07 44 89 f0 48 83 c4 30 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc e8 91 6b 5c fd 90 <0f> 0b e8 89 6b 5c fd 90 0f 0b 66 0f 1f 44 00 00 90 90 90 90 90 90
RSP: 0018:ffffc90002796ff8 EFLAGS: 00010293
RAX: ffffffff844316df RBX: 000000000000009b RCX: ffff888035742440
RDX: 0000000000000000 RSI: 000000000000009c RDI: 000000000000009b
RBP: ffff88805334ab40 R08: ffffffff84431539 R09: 1ffff1100a669567
R10: dffffc0000000000 R11: ffffed100a669568 R12: ffff88805334a608
R13: dffffc0000000000 R14: 0009000000000001 R15: 000000000000009c
FS:  0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000563034579068 CR3: 0000000040912000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_trigger_alloc+0x16d9/0x41e0 fs/bcachefs/alloc_background.c:948
 bch2_key_trigger fs/bcachefs/bkey_methods.h:87 [inline]
 run_one_mem_trigger+0x81f/0xc10 fs/bcachefs/btree_trans_commit.c:472
 bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:731 [inline]
 do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:900 [inline]
 __bch2_trans_commit+0x473b/0x93c0 fs/bcachefs/btree_trans_commit.c:1121
 bch2_trans_commit fs/bcachefs/btree_update.h:184 [inline]
 btree_update_nodes_written fs/bcachefs/btree_update_interior.c:723 [inline]
 btree_interior_update_work+0x1492/0x2b10 fs/bcachefs/btree_update_interior.c:861
 process_one_work kernel/workqueue.c:3236 [inline]
 process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317
 worker_thread+0x870/0xd30 kernel/workqueue.c:3398
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:journal_seq_to_buf fs/bcachefs/journal.c:105 [inline]
RIP: 0010:bch2_journal_noflush_seq+0x320/0x330 fs/bcachefs/journal.c:819
Code: e8 b5 6b 5c fd 48 8b 3c 24 e8 4c b5 88 07 44 89 f0 48 83 c4 30 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc e8 91 6b 5c fd 90 <0f> 0b e8 89 6b 5c fd 90 0f 0b 66 0f 1f 44 00 00 90 90 90 90 90 90
RSP: 0018:ffffc90002796ff8 EFLAGS: 00010293
RAX: ffffffff844316df RBX: 000000000000009b RCX: ffff888035742440
RDX: 0000000000000000 RSI: 000000000000009c RDI: 000000000000009b
RBP: ffff88805334ab40 R08: ffffffff84431539 R09: 1ffff1100a669567
R10: dffffc0000000000 R11: ffffed100a669568 R12: ffff88805334a608
R13: dffffc0000000000 R14: 0009000000000001 R15: 000000000000009c
FS:  0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000563034579068 CR3: 0000000040912000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400