------------[ cut here ]------------ WARNING: CPU: 0 PID: 4426 at fs/btrfs/block-group.c:3686 do_chunk_alloc fs/btrfs/block-group.c:3686 [inline] WARNING: CPU: 0 PID: 4426 at fs/btrfs/block-group.c:3686 btrfs_chunk_alloc+0xe47/0xff0 fs/btrfs/block-group.c:3928 Modules linked in: CPU: 0 PID: 4426 Comm: syz.1.11 Not tainted 6.1.114-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:do_chunk_alloc fs/btrfs/block-group.c:3686 [inline] RIP: 0010:btrfs_chunk_alloc+0xe47/0xff0 fs/btrfs/block-group.c:3928 Code: fd 48 c7 c7 00 36 50 8b 44 89 e6 e8 43 ea a3 fd 0f 0b e9 02 fe ff ff e8 77 d0 db fd 48 c7 c7 00 36 50 8b 89 ee e8 29 ea a3 fd <0f> 0b e9 0d fe ff ff e8 5d d0 db fd 48 c7 c7 00 36 50 8b 44 89 e6 RSP: 0018:ffffc900048e65d8 EFLAGS: 00010246 RAX: 2c1bdee0c790eb00 RBX: ffff88807ab3c001 RCX: 0000000000040000 RDX: ffffc9000ca71000 RSI: 00000000000164d9 RDI: 00000000000164da RBP: ffffffffffffffe4 R08: ffffffff8152afae R09: fffff5200091cc1d R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888144f25800 R13: dffffc0000000000 R14: ffff88807d90c000 R15: 0000000000000000 FS: 00007f2cf8b8f6c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffc89cb5e68 CR3: 000000001cb81000 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:4125 [inline] find_free_extent+0x49cc/0x56d0 fs/btrfs/extent-tree.c:4511 btrfs_reserve_extent+0x424/0x810 fs/btrfs/extent-tree.c:4604 cow_file_range+0x562/0xfb0 fs/btrfs/inode.c:1276 fallback_to_cow+0x652/0xa90 fs/btrfs/inode.c:1754 run_delalloc_nocow+0x12a3/0x14f0 fs/btrfs/inode.c:2161 btrfs_run_delalloc_range+0x3cf/0x1110 fs/btrfs/inode.c:2221 writepage_delalloc+0x25d/0x580 fs/btrfs/extent_io.c:1972 __extent_writepage+0x6e3/0x1730 fs/btrfs/extent_io.c:2276 extent_write_cache_pages fs/btrfs/extent_io.c:3191 [inline] extent_writepages+0xbe0/0x17a0 fs/btrfs/extent_io.c:3313 do_writepages+0x3a2/0x670 mm/page-writeback.c:2491 filemap_fdatawrite_wbc+0x121/0x180 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] filemap_fdatawrite_range+0x16a/0x1e0 mm/filemap.c:439 btrfs_fdatawrite_range fs/btrfs/file.c:3877 [inline] start_ordered_ops+0xe6/0x210 fs/btrfs/file.c:1744 btrfs_sync_file+0x48f/0x1300 fs/btrfs/file.c:1827 generic_write_sync include/linux/fs.h:2962 [inline] btrfs_do_write_iter+0xad2/0x1360 fs/btrfs/file.c:1693 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x857/0xbc0 fs/read_write.c:584 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f2cf7d7e719 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2cf8b8f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f2cf7f36058 RCX: 00007f2cf7d7e719 RDX: 000000000000fea7 RSI: 0000000020000040 RDI: 0000000000000006 RBP: 00007f2cf7df132e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2cf7f36058 R15: 00007fff8551acd8