------------[ cut here ]------------ WARNING: CPU: 0 PID: 5339 at fs/btrfs/space-info.h:199 btrfs_space_info_update_bytes_may_use+0x524/0x820 fs/btrfs/space-info.h:199 Modules linked in: CPU: 0 PID: 5339 Comm: syz-executor.3 Not tainted 6.1.0-rc5-next-20221116-syzkaller #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:199 Code: fd e9 77 fb ff ff e8 fb 48 f9 fd 4d 89 e6 48 89 de 49 f7 de 4c 89 f7 e8 3a 45 f9 fd 49 39 de 0f 86 b5 fc ff ff e8 dc 48 f9 fd <0f> 0b 31 db e9 af fc ff ff e8 ce 48 f9 fd 48 8d 7d 18 be ff ff ff RSP: 0018:ffffc9000430fab8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 00000000000df000 RCX: 0000000000000000 RDX: ffff888027e6d7c0 RSI: ffffffff83875c04 RDI: 0000000000000006 RBP: ffff888027430800 R08: 0000000000000006 R09: 00000000000e0000 R10: 00000000000df000 R11: 0000000000000000 R12: fffffffffff20000 R13: ffff888027430860 R14: 00000000000e0000 R15: 0000000000000002 FS: 000055555656b400(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4b86138008 CR3: 000000003eb0a000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_space_info_free_bytes_may_use fs/btrfs/space-info.h:231 [inline] block_rsv_release_bytes fs/btrfs/block-rsv.c:153 [inline] btrfs_block_rsv_release+0x519/0x650 fs/btrfs/block-rsv.c:297 btrfs_release_global_block_rsv+0x26/0x2e0 fs/btrfs/block-rsv.c:440 btrfs_free_block_groups+0x958/0x1110 fs/btrfs/block-group.c:4125 close_ctree+0xd23/0xdcf fs/btrfs/disk-io.c:4776 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:2132 deactivate_locked_super+0x98/0x160 fs/super.c:332 deactivate_super+0xb1/0xd0 fs/super.c:363 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1291 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:0x7fbf2a88d547 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:00007ffc8ad85cb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fbf2a88d547 RDX: 00007ffc8ad85d8b RSI: 000000000000000a RDI: 00007ffc8ad85d80 RBP: 00007ffc8ad85d80 R08: 00000000ffffffff R09: 00007ffc8ad85b50 R10: 000055555656c8b3 R11: 0000000000000246 R12: 00007fbf2a8e6b24 R13: 00007ffc8ad86e40 R14: 000055555656c810 R15: 00007ffc8ad86e80