------------[ cut here ]------------
WARNING: CPU: 0 PID: 4211 at fs/btrfs/extent-tree.c:3067 __btrfs_free_extent+0xc8c/0x2c40 fs/btrfs/extent-tree.c:3067
Modules linked in:
CPU: 1 PID: 4211 Comm: kworker/u4:5 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: events_unbound btrfs_async_reclaim_metadata_space
RIP: 0010:__btrfs_free_extent+0xc8c/0x2c40 fs/btrfs/extent-tree.c:3067
Code: 00 00 fc ff df 4c 8b 7c 24 18 0f 1f 44 00 00 e8 4a 23 1a fe eb 16 e8 43 23 1a fe 48 c7 c7 a0 91 ea 8a 44 89 f6 e8 d4 bc e5 fd <0f> 0b 4c 89 e7 48 c7 c6 80 9e ea 8a ba fb 0b 00 00 44 89 f1 e8 bb
RSP: 0018:ffffc900030cf4e0 EFLAGS: 00010246
RAX: ef3894345b25fe00 RBX: 0000000000000000 RCX: ffff888078781dc0
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc900030cf6a0 R08: ffffffff8166aa8c R09: ffffed10171c4f24
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888060773630
R13: dffffc0000000000 R14: 00000000ffffffe4 R15: ffff8880629dc0b0
FS: 0000000000000000(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564e12a0e950 CR3: 000000002649e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:1962 [inline]
__btrfs_run_delayed_refs+0x104c/0x4150 fs/btrfs/extent-tree.c:2025
btrfs_run_delayed_refs+0x141/0x490 fs/btrfs/extent-tree.c:2156
flush_space+0x9f5/0xd50 fs/btrfs/space-info.c:660
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
</TASK>