------------[ cut here ]------------ WARNING: CPU: 1 PID: 33 at fs/btrfs/block-group.c:3621 do_chunk_alloc fs/btrfs/block-group.c:3621 [inline] WARNING: CPU: 1 PID: 33 at fs/btrfs/block-group.c:3621 btrfs_chunk_alloc+0xe47/0xff0 fs/btrfs/block-group.c:3863 Modules linked in: CPU: 1 PID: 33 Comm: kworker/u4:2 Not tainted 6.1.62-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Workqueue: events_unbound btrfs_async_reclaim_metadata_space RIP: 0010:do_chunk_alloc fs/btrfs/block-group.c:3621 [inline] RIP: 0010:btrfs_chunk_alloc+0xe47/0xff0 fs/btrfs/block-group.c:3863 Code: fd 48 c7 c7 40 b4 2f 8b 44 89 e6 e8 83 b4 a5 fd 0f 0b e9 02 fe ff ff e8 c7 c7 dd fd 48 c7 c7 40 b4 2f 8b 89 ee e8 69 b4 a5 fd <0f> 0b e9 0d fe ff ff e8 ad c7 dd fd 48 c7 c7 40 b4 2f 8b 44 89 e6 RSP: 0000:ffffc90000a9f9c8 EFLAGS: 00010246 RAX: 8a5b9d5623b87400 RBX: ffff8880927a0001 RCX: ffff888016a91dc0 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffffffffffffe4 R08: ffffffff81527dae R09: ffffed1017324f1c R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888077993800 R13: dffffc0000000000 R14: ffff8880950da000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa5916ef068 CR3: 0000000073794000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: flush_space+0xa03/0xe60 fs/btrfs/space-info.c:766 btrfs_async_reclaim_metadata_space+0x29b/0x340 fs/btrfs/space-info.c:1080 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306