WARNING: CPU: 1 PID: 2431 at fs/btrfs/block-group.c:3845 do_chunk_alloc fs/btrfs/block-group.c:3845 [inline] WARNING: CPU: 1 PID: 2431 at fs/btrfs/block-group.c:3845 btrfs_chunk_alloc+0x105b/0x11a0 fs/btrfs/block-group.c:4087 Modules linked in: CPU: 1 PID: 2431 Comm: kworker/u4:9 Not tainted 6.5.0-rc7-next-20230824-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Workqueue: events_unbound btrfs_async_reclaim_metadata_space RIP: 0010:do_chunk_alloc fs/btrfs/block-group.c:3845 [inline] RIP: 0010:btrfs_chunk_alloc+0x105b/0x11a0 fs/btrfs/block-group.c:4087 Code: fa 48 c7 c6 c0 e3 d8 8a 48 8b 78 50 e8 2e 8b 02 00 e9 f7 fe ff ff e8 b4 09 ef fd 44 89 e6 48 c7 c7 60 e3 d8 8a e8 05 28 b5 fd <0f> 0b e9 10 ff ff ff 48 8b 7c 24 48 e8 e4 aa 44 fe eb bc 48 8b 7c RSP: 0018:ffffc90009d1fa58 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff8880764f0888 RCX: 0000000000000000 RDX: ffff888025419dc0 RSI: ffffffff814df276 RDI: 0000000000000001 RBP: ffff88801e810800 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffffffffffffffe4 R13: ffff88803ccf5800 R14: 0000000000000001 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30d21000 CR3: 0000000031806000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: flush_space+0x908/0xe30 fs/btrfs/space-info.c:765 btrfs_async_reclaim_metadata_space+0x51c/0xa90 fs/btrfs/space-info.c:1069 process_one_work+0x887/0x15d0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8bb/0x1290 kernel/workqueue.c:2784 kthread+0x33a/0x430 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304