------------[ cut here ]------------ WARNING: CPU: 1 PID: 144 at fs/btrfs/block-group.c:3503 do_chunk_alloc fs/btrfs/block-group.c:3503 [inline] WARNING: CPU: 1 PID: 144 at fs/btrfs/block-group.c:3503 btrfs_chunk_alloc+0xc0e/0x1020 fs/btrfs/block-group.c:3726 Modules linked in: CPU: 1 PID: 144 Comm: kworker/u4:1 Not tainted 5.15.167-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: events_unbound btrfs_async_reclaim_metadata_space RIP: 0010:do_chunk_alloc fs/btrfs/block-group.c:3503 [inline] RIP: 0010:btrfs_chunk_alloc+0xc0e/0x1020 fs/btrfs/block-group.c:3726 Code: 00 00 00 fc ff df 4c 8b 24 24 0f 1f 44 00 00 e8 18 1e fc fd eb 16 e8 11 1e fc fd 48 c7 c7 a0 27 cc 8a 44 89 ee e8 e2 c7 c7 fd <0f> 0b 48 8b 7c 24 20 48 c7 c6 a0 35 cc 8a ba af 0d 00 00 e9 8e 00 RSP: 0018:ffffc9000115e958 EFLAGS: 00010246 RAX: 31efc7bcf36f9900 RBX: dffffc0000000000 RCX: ffff88801d408000 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: ffff888028850001 R08: ffffffff81668a3c R09: ffffed1017224f24 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880296dc084 R13: ffffffffffffffe4 R14: ffff8880757a346b R15: 1ffff110052db810 FS: 0000000000000000(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000205a1000 CR3: 0000000065903000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: find_free_extent_update_loop fs/btrfs/extent-tree.c:4039 [inline] find_free_extent+0x3eb7/0x4ff0 fs/btrfs/extent-tree.c:4402 btrfs_reserve_extent+0x20a/0x540 fs/btrfs/extent-tree.c:4483 cow_file_range+0x674/0xe10 fs/btrfs/inode.c:1181 btrfs_run_delalloc_range+0x38b/0x1500 fs/btrfs/inode.c:2018 writepage_delalloc+0x283/0x5a0 fs/btrfs/extent_io.c:3802 __extent_writepage+0x57d/0xbc0 fs/btrfs/extent_io.c:4108 extent_write_cache_pages fs/btrfs/extent_io.c:5030 [inline] extent_writepages+0xbbd/0x1590 fs/btrfs/extent_io.c:5157 do_writepages+0x481/0x730 mm/page-writeback.c:2386 filemap_fdatawrite_wbc+0x1d6/0x230 mm/filemap.c:400 start_delalloc_inodes+0x7df/0xca0 fs/btrfs/inode.c:10126 btrfs_start_delalloc_roots+0x72f/0xa70 fs/btrfs/inode.c:10205 shrink_delalloc fs/btrfs/space-info.c:538 [inline] flush_space+0x650/0xd50 fs/btrfs/space-info.c:646 btrfs_async_reclaim_metadata_space+0x29b/0x340 fs/btrfs/space-info.c:953 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287