------------[ cut here ]------------ WARNING: CPU: 1 PID: 3688 at fs/btrfs/space-info.h:122 btrfs_space_info_update_bytes_may_use+0x524/0x820 fs/btrfs/space-info.h:122 Modules linked in: CPU: 1 PID: 3688 Comm: syz-executor.5 Not tainted 6.1.0-rc6-syzkaller-00251-g0b1dcc2cf55a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:btrfs_space_info_update_bytes_may_use+0x524/0x820 fs/btrfs/space-info.h:122 Code: fd e9 77 fb ff ff e8 9b 8f ff fd 4d 89 e6 48 89 de 49 f7 de 4c 89 f7 e8 da 8b ff fd 49 39 de 0f 86 b5 fc ff ff e8 7c 8f ff fd <0f> 0b 31 db e9 af fc ff ff e8 6e 8f ff fd 48 8d 7d 18 be ff ff ff RSP: 0018:ffffc900045dfab8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00000000000df000 RCX: 0000000000000000 RDX: ffff88801fb50000 RSI: ffffffff83808a94 RDI: 0000000000000006 RBP: ffff88807d64c800 R08: 0000000000000006 R09: 00000000000e0000 R10: 00000000000df000 R11: 0000000000000000 R12: fffffffffff20000 R13: ffff88807d64c860 R14: 00000000000e0000 R15: 0000000000000002 FS: 0000555555a10400(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000000 CR3: 000000008c823000 CR4: 0000000000350ee0 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:151 [inline] btrfs_block_rsv_release+0x519/0x650 fs/btrfs/block-rsv.c:295 btrfs_release_global_block_rsv+0x26/0x2e0 fs/btrfs/block-rsv.c:463 btrfs_free_block_groups+0x958/0x1110 fs/btrfs/block-group.c:4051 close_ctree+0xd1b/0xdc7 fs/btrfs/disk-io.c:4710 generic_shutdown_super+0x158/0x410 fs/super.c:492 kill_anon_super+0x3a/0x60 fs/super.c:1086 btrfs_kill_super+0x3c/0x50 fs/btrfs/super.c:2441 deactivate_locked_super+0x98/0x160 fs/super.c:332 deactivate_super+0xb1/0xd0 fs/super.c:363 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1186 task_work_run+0x16f/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fcd8fa8d547 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:00007fff39b32a38 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fcd8fa8d547 RDX: 00007fff39b32b0b RSI: 000000000000000a RDI: 00007fff39b32b00 RBP: 00007fff39b32b00 R08: 00000000ffffffff R09: 00007fff39b328d0 R10: 0000555555a118b3 R11: 0000000000000246 R12: 00007fcd8fae6b24 R13: 00007fff39b33bc0 R14: 0000555555a11810 R15: 00007fff39b33c00