------------[ cut here ]------------ WARNING: CPU: 0 PID: 20840 at fs/btrfs/transaction.c:145 btrfs_put_transaction+0x37f/0x3e0 Modules linked in: CPU: 0 PID: 20840 Comm: syz-executor.2 Not tainted 6.2.0-rc8-syzkaller-00015-gf6feea56f66d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 RIP: 0010:btrfs_put_transaction+0x37f/0x3e0 fs/btrfs/transaction.c:144 Code: 48 89 da e8 23 f2 17 07 e9 00 fe ff ff e8 69 fa fe fd 0f 0b e9 ef fc ff ff e8 5d fa fe fd 0f 0b e9 72 fd ff ff e8 51 fa fe fd <0f> 0b e9 9b fd ff ff e8 45 fa fe fd 48 89 df be 03 00 00 00 48 83 RSP: 0018:ffffc900147b74a0 EFLAGS: 00010246 RAX: ffffffff838cd7ff RBX: ffff888022d65330 RCX: 0000000000040000 RDX: ffffc9000cf27000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: 0000000000000001 R08: ffffffff838cd4ff R09: ffffed10045aca03 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88805f690000 R13: ffff888022d65000 R14: ffff888022d65000 R15: dffffc0000000000 FS: 00007f6e70f85700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000201a0000 CR3: 0000000029d27000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: cleanup_transaction+0x5ed/0x780 fs/btrfs/transaction.c:2032 btrfs_commit_transaction+0x296f/0x3310 fs/btrfs/transaction.c:2553 btrfs_sync_file+0xd85/0x11c0 fs/btrfs/file.c:2001 generic_write_sync include/linux/fs.h:2885 [inline] btrfs_do_write_iter+0xccc/0x1270 fs/btrfs/file.c:1684 do_iter_write+0x6ea/0xc50 fs/read_write.c:861 vfs_writev fs/read_write.c:934 [inline] do_pwritev+0x21a/0x360 fs/read_write.c:1031 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6e7028c0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6e70f85168 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 00007f6e703ac2c0 RCX: 00007f6e7028c0f9 RDX: 0000000000000003 RSI: 00000000200017c0 RDI: 0000000000000005 RBP: 00007f6e702e7ae9 R08: 0000000000000009 R09: 0000000000000003 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc8706575f R14: 00007f6e70f85300 R15: 0000000000022000