------------[ cut here ]------------ btrfs_abort_should_print_stack(__error) WARNING: fs/btrfs/free-space-tree.c:1440 at __add_block_group_free_space+0x5a3/0x5b0 fs/btrfs/free-space-tree.c:1440, CPU#0: syz.0.0/5324 Modules linked in: CPU: 0 UID: 0 PID: 5324 Comm: syz.0.0 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:__add_block_group_free_space+0x5a3/0x5b0 fs/btrfs/free-space-tree.c:1440 Code: 07 38 c1 0f 8c ce fc ff ff 4c 89 f7 e8 36 bf 00 fe e9 c1 fc ff ff e8 1c 89 91 fd eb 10 e8 15 89 91 fd eb 09 e8 0e 89 91 fd 90 <0f> 0b 90 44 89 e1 f7 d9 e9 51 fe ff ff 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000e207898 EFLAGS: 00010293 RAX: ffffffff843588a2 RBX: ffff888052e90001 RCX: ffff88803bc48000 RDX: 0000000000000000 RSI: ffffffff8f1f5b60 RDI: 00000000ffffffe4 RBP: ffff888043b6c758 R08: ffff88803bc48000 R09: 0000000000000003 R10: 00000000fffffffb R11: 0000000000000000 R12: 00000000ffffffe4 R13: ffff888052eee6e0 R14: ffff888043b6c7b8 R15: 0000000000000000 FS: 00007fce568316c0(0000) GS:ffff88808c549000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f185f49e000 CR3: 0000000052a27000 CR4: 0000000000352ef0 Call Trace: btrfs_add_block_group_free_space+0xd0/0x130 fs/btrfs/free-space-tree.c:1465 btrfs_create_pending_block_groups+0xcc6/0x15e0 fs/btrfs/block-group.c:2952 __btrfs_end_transaction+0x140/0x640 fs/btrfs/transaction.c:1092 btrfs_create_common+0x221/0x310 fs/btrfs/inode.c:6985 btrfs_mkdir+0xc7/0xf0 fs/btrfs/inode.c:7117 vfs_mkdir+0x406/0x620 fs/namei.c:5276 filename_mkdirat+0x285/0x510 fs/namei.c:5309 __do_sys_mkdirat fs/namei.c:5330 [inline] __se_sys_mkdirat+0x35/0x150 fs/namei.c:5327 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fce5599e0d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fce56830fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fce55c26090 RCX: 00007fce5599e0d9 RDX: 00000000000001ff RSI: 0000200000000000 RDI: ffffffffffffff9c RBP: 00007fce55a35024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fce55c26128 R14: 00007fce55c26090 R15: 00007ffef5fe15e8