BTRFS info (device loop0): using free space tree BTRFS info (device loop0): enabling ssd optimizations ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-io-tree.c:517! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 3073 Comm: syz-executor990 Not tainted 6.1.0-rc6-syzkaller-32662-g6d464646530f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : clear_state_bit+0x1c8/0x1cc fs/btrfs/extent-io-tree.c:517 lr : clear_state_bit+0x1c8/0x1cc fs/btrfs/extent-io-tree.c:517 sp : ffff80000ff63280 x29: ffff80000ff63280 x28: ffff80000ff633c0 x27: ffff0000cae73100 x26: 000000000000ffff x25: 00000000fffe5eff x24: 0000000000001000 x23: 0000000000001000 x22: 00000000fffffff4 x21: 0000000000000000 x20: ffff0000cab51310 x19: ffff0000cae73100 x18: 00000000000000c0 x17: ffff80000dda8198 x16: ffff80000dbe6158 x15: ffff0000c679cec0 x14: 00000000000000c0 x13: 00000000ffffffff x12: ffff0000c679cec0 x11: ff80800009245938 x10: 0000000000000000 x9 : ffff800009245938 x8 : ffff0000c679cec0 x7 : ffff800009244b1c x6 : 0000000000000000 x5 : 00000000ffffffff x4 : 0000000000000a20 x3 : 0000000000000080 x2 : 0000000000000038 x1 : 00000000fffffff4 x0 : 0000000000000000 Call trace: clear_state_bit+0x1c8/0x1cc fs/btrfs/extent-io-tree.c:517 __clear_extent_bit+0x440/0x94c fs/btrfs/extent-io-tree.c:674 clear_record_extent_bits+0x64/0x94 fs/btrfs/extent-io-tree.c:1614 __btrfs_qgroup_release_data+0x248/0x304 fs/btrfs/qgroup.c:3870 btrfs_qgroup_release_data+0x3c/0x50 fs/btrfs/qgroup.c:3924 btrfs_add_ordered_extent+0xac/0x480 fs/btrfs/ordered-data.c:188 cow_file_range+0x37c/0x7ac fs/btrfs/inode.c:1299 btrfs_run_delalloc_range+0x1d8/0x410 fs/btrfs/inode.c:2229 writepage_delalloc+0xbc/0x200 fs/btrfs/extent_io.c:1968 __extent_writepage+0x2b8/0x9d0 fs/btrfs/extent_io.c:2272 extent_write_cache_pages+0x490/0x9fc fs/btrfs/extent_io.c:3186 extent_writepages+0xd4/0x1e0 fs/btrfs/extent_io.c:3308 btrfs_writepages+0x28/0x38 fs/btrfs/inode.c:8132 do_writepages+0x144/0x27c mm/page-writeback.c:2469 filemap_fdatawrite_wbc+0xac/0xd0 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] filemap_fdatawrite_range+0x70/0xa0 mm/filemap.c:439 btrfs_fdatawrite_range+0x34/0xa4 fs/btrfs/file.c:4155 btrfs_wait_ordered_range+0x6c/0x1c0 fs/btrfs/ordered-data.c:774 btrfs_punch_hole fs/btrfs/file.c:2913 [inline] btrfs_fallocate+0x144/0xdcc fs/btrfs/file.c:3367 vfs_fallocate+0x328/0x38c fs/open.c:323 ioctl_preallocate+0x16c/0x1bc fs/ioctl.c:290 do_vfs_ioctl+0x123c/0x16a4 fs/ioctl.c:849 __do_sys_ioctl fs/ioctl.c:868 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __arm64_sys_ioctl+0x98/0x140 fs/ioctl.c:856 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall arch/arm64/kernel/syscall.c:52 [inline] el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584 Code: a8c57bfd d50323bf d65f03c0 97c18009 (d4210000) ---[ end trace 0000000000000000 ]---