------------[ cut here ]------------ WARNING: CPU: 0 PID: 5806 at fs/btrfs/space-info.h:122 btrfs_space_info_update_bytes_may_use+0x312/0x500 fs/btrfs/space-info.h:122 Modules linked in: CPU: 0 PID: 5806 Comm: syz-executor.0 Not tainted 5.11.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 RIP: 0010:btrfs_space_info_update_bytes_may_use fs/btrfs/space-info.h:122 [inline] RIP: 0010:btrfs_space_info_update_bytes_may_use+0x312/0x500 fs/btrfs/space-info.h:122 Code: 04 26 dc ff 65 ff 0d ad 71 f8 7c 0f 85 5f fd ff ff e8 e1 bd f6 fd e9 55 fd ff ff 48 89 e8 48 f7 d8 48 39 c2 0f 83 eb fd ff ff <0f> 0b 31 ed e9 e5 fd ff ff 48 8d 7b 18 be ff ff ff ff e8 87 b2 25 RSP: 0018:ffffc900016cfc20 EFLAGS: 00010287 RAX: 00000000000d0000 RBX: ffff88801eb45000 RCX: 0000000000000001 RDX: 00000000000c0000 RSI: ffffffff888ac880 RDI: ffffffff88de0fa0 RBP: fffffffffff30000 R08: 0000000000000000 R09: ffffffff8c31aa0f R10: fffffbfff1863541 R11: 00000000000d0000 R12: 0000000000000000 R13: 0000000000000000 R14: ffff88801eb45060 R15: 0000000000000000 FS: 0000555556232400(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000014fbb000 CR4: 0000000000350ef0 Call Trace: btrfs_space_info_free_bytes_may_use fs/btrfs/space-info.h:154 [inline] block_rsv_release_bytes fs/btrfs/block-rsv.c:150 [inline] btrfs_block_rsv_release+0x3e3/0x670 fs/btrfs/block-rsv.c:294 btrfs_release_global_block_rsv+0x19/0x200 fs/btrfs/block-rsv.c:450 btrfs_free_block_groups+0x537/0xb20 fs/btrfs/block-group.c:3415 close_ctree+0x5ea/0x68d fs/btrfs/disk-io.c:4318 generic_shutdown_super+0x126/0x320 fs/super.c:464 kill_anon_super+0x31/0x50 fs/super.c:1056 btrfs_kill_super+0x33/0x50 fs/btrfs/super.c:2353 deactivate_locked_super+0x7b/0x130 fs/super.c:335 cleanup_mnt+0x326/0x4c0 fs/namespace.c:1149 task_work_run+0xc0/0x160 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x249/0x250 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f90dea06a17 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 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 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffcec8f98c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f90dea06a17 RDX: 00007ffcec8f999a RSI: 000000000000000a RDI: 00007ffcec8f9990 RBP: 00007ffcec8f9990 R08: 00000000ffffffff R09: 00007ffcec8f9760 R10: 00005555562338b3 R11: 0000000000000246 R12: 00007f90dea5f826 R13: 00007ffcec8faa50 R14: 0000555556233810 R15: 00007ffcec8faa90