------------[ cut here ]------------ 1 WARNING: fs/btrfs/space-info.h:286 at btrfs_space_info_update_bytes_may_use fs/btrfs/space-info.h:286 [inline], CPU#0: syz-executor/5443 WARNING: fs/btrfs/space-info.h:286 at btrfs_add_reserved_bytes+0x51b/0x8b0 fs/btrfs/block-group.c:4029, CPU#0: syz-executor/5443 Modules linked in: CPU: 0 UID: 0 PID: 5443 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:btrfs_space_info_update_bytes_may_use fs/btrfs/space-info.h:286 [inline] RIP: 0010:btrfs_add_reserved_bytes+0x51b/0x8b0 fs/btrfs/block-group.c:4029 Code: ac 24 80 00 00 00 74 08 48 89 ef e8 2f b4 f6 fd 4c 8b 75 00 4c 89 f7 4c 89 ee e8 30 14 85 fd 4d 39 ee 73 18 e8 56 11 85 fd 90 <0f> 0b 90 45 31 f6 eb 2e e8 48 11 85 fd e9 f8 fb ff ff e8 3e 11 85 RSP: 0018:ffffc90001e1ec10 EFLAGS: 00010293 RAX: ffffffff8442dbba RBX: 1ffff1100889b910 RCX: ffff888000bc4b00 RDX: 0000000000000000 RSI: 0000000000001000 RDI: 0000000000000000 RBP: ffff8880444dc880 R08: ffffffff907a847f R09: 1ffffffff20f508f R10: dffffc0000000000 R11: fffffbfff20f5090 R12: ffff8880444dc800 R13: 0000000000001000 R14: 0000000000000000 R15: ffff8880444dc820 FS: 000055559168c500(0000) GS:ffff88808c2bf000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005555916a7a28 CR3: 000000001f9a3000 CR4: 0000000000352ef0 Call Trace: find_free_extent+0x3ff4/0x5cd0 fs/btrfs/extent-tree.c:4776 btrfs_reserve_extent+0x349/0x850 fs/btrfs/extent-tree.c:4904 btrfs_alloc_tree_block+0x1ed/0x1160 fs/btrfs/extent-tree.c:5375 btrfs_force_cow_block+0x562/0x1bf0 fs/btrfs/ctree.c:501 btrfs_cow_block+0x3f1/0xaf0 fs/btrfs/ctree.c:696 btrfs_search_slot+0xd70/0x2d20 fs/btrfs/ctree.c:-1 btrfs_insert_empty_items+0xa3/0x1a0 fs/btrfs/ctree.c:4310 btrfs_insert_delayed_item fs/btrfs/delayed-inode.c:755 [inline] btrfs_insert_delayed_items fs/btrfs/delayed-inode.c:832 [inline] __btrfs_commit_inode_delayed_items+0xb0e/0x1ec0 fs/btrfs/delayed-inode.c:1115 __btrfs_run_delayed_items+0x1d0/0x420 fs/btrfs/delayed-inode.c:1158 btrfs_commit_transaction+0x844/0x3170 fs/btrfs/transaction.c:2383 sync_filesystem+0x1d2/0x240 fs/sync.c:66 generic_shutdown_super+0x77/0x2d0 fs/super.c:734 kill_anon_super+0x3b/0x70 fs/super.c:1356 btrfs_kill_super+0x41/0x50 fs/btrfs/super.c:2152 deactivate_locked_super+0xbc/0x110 fs/super.c:589 cleanup_mnt+0x3d3/0x460 fs/namespace.c:1317 task_work_run+0x1d9/0x270 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:70 [inline] exit_to_user_mode_loop+0x204/0x770 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline] do_syscall_64+0x328/0x520 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f68fe39f397 Code: a2 c7 05 5c 43 25 00 00 00 00 00 eb 96 e8 e1 12 00 00 90 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007fffcd75c7e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f68fe4344bb RCX: 00007f68fe39f397 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007fffcd75c8a0 RBP: 00007fffcd75c8a0 R08: 00007fffcd75d8a0 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 00007fffcd75d930 R13: 00007f68fe4344bb R14: 000000000006482c R15: 00007fffcd75d970