RSP: 002b:00007ffde59e4cb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f9a61e8dec9 RDX: 0000000000000001 RSI: 0000000020000280 RDI: 0000000000000005 RBP: 00007ffde59e4cf0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000008000000 R11: 0000000000000246 R12: 0000000000000006 R13: 00007ffde59e4d30 R14: 00007ffde59e4d10 R15: 0000000000000003 ------------[ cut here ]------------ WARNING: CPU: 1 PID: 5147 at fs/btrfs/space-info.h:197 btrfs_space_info_free_bytes_may_use fs/btrfs/space-info.h:229 [inline] WARNING: CPU: 1 PID: 5147 at fs/btrfs/space-info.h:197 btrfs_free_reserved_data_space_noquota+0x2c5/0x4c0 fs/btrfs/delalloc-space.c:181 Modules linked in: CPU: 1 PID: 5147 Comm: syz-executor294 Not tainted 6.3.0-rc3-syzkaller-00322-g4bdec23f971b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 RIP: 0010:btrfs_space_info_update_bytes_may_use fs/btrfs/space-info.h:197 [inline] RIP: 0010:btrfs_space_info_free_bytes_may_use fs/btrfs/space-info.h:229 [inline] RIP: 0010:btrfs_free_reserved_data_space_noquota+0x2c5/0x4c0 fs/btrfs/delalloc-space.c:181 Code: 2d 00 00 74 08 4c 89 ff e8 88 3c 38 fe 4d 8b 27 4c 89 e7 48 8b 5c 24 18 48 89 de e8 d5 87 e2 fd 49 39 dc 73 13 e8 bb 85 e2 fd <0f> 0b 31 db 41 80 7c 2d 00 00 75 8b eb 91 e8 a8 85 e2 fd 41 80 7c RSP: 0018:ffffc9000407f408 EFLAGS: 00010293 RAX: ffffffff83a7e765 RBX: 0000000000800000 RCX: ffff888029b68000 RDX: 0000000000000000 RSI: 0000000000800000 RDI: 00000000005cb000 RBP: dffffc0000000000 R08: ffffffff83a7e75b R09: fffffbfff1ca6f0e R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000005cb000 R13: 1ffff110055d090c R14: ffff88802859c000 R15: ffff88802ae84860 FS: 00005555572df300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9a61f05140 CR3: 000000002092b000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_free_reserved_data_space+0xa2/0xe0 fs/btrfs/delalloc-space.c:201 btrfs_dio_iomap_begin+0x852/0xf20 fs/btrfs/inode.c:7695 iomap_iter+0x677/0xec0 fs/iomap/iter.c:91 __iomap_dio_rw+0xd74/0x20d0 fs/iomap/direct-io.c:594 btrfs_dio_write+0xbc/0x110 fs/btrfs/inode.c:7803 btrfs_direct_write fs/btrfs/file.c:1529 [inline] btrfs_do_write_iter+0x86f/0x1270 fs/btrfs/file.c:1674 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:0x7f9a61e8dec9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffde59e4cb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000148 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f9a61e8dec9 RDX: 0000000000000001 RSI: 0000000020000280 RDI: 0000000000000005 RBP: 00007ffde59e4cf0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000008000000 R11: 0000000000000246 R12: 0000000000000006 R13: 00007ffde59e4d30 R14: 00007ffde59e4d10 R15: 0000000000000003