------------[ cut here ]------------ WARNING: CPU: 0 PID: 5971 at fs/bcachefs/fs-io.c:315 __bch2_truncate_folio+0x2059/0x2450 fs/bcachefs/fs-io.c:315 Modules linked in: CPU: 0 UID: 0 PID: 5971 Comm: syz.1.2 Not tainted 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:__bch2_truncate_folio+0x2059/0x2450 fs/bcachefs/fs-io.c:315 Code: 41 5f 5d e9 14 bb b0 07 e8 14 ec 5f fd 48 c7 c7 30 0e 11 8e e8 68 8d e8 ff 89 05 f2 de 16 16 e9 a0 e2 ff ff e8 f8 eb 5f fd 90 <0f> 0b 90 e9 eb f9 ff ff 44 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c f6 RSP: 0018:ffffc9000471f8e0 EFLAGS: 00010283 RAX: ffffffff843f8618 RBX: 0000000000000000 RCX: 0000000000080000 RDX: ffffc9000bcb1000 RSI: 0000000000001b2e RDI: 0000000000001b2f RBP: ffffc9000471fbf0 R08: ffffffff843f7ffe R09: 1ffffd40002dbc70 R10: dffffc0000000000 R11: fffff940002dbc71 R12: 1ffff1100b3fe0fa R13: ffff888057a806ba R14: 0000000000000000 R15: ffff888059ff07d0 FS: 00007f922bbc46c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9f789629c0 CR3: 000000007e222000 CR4: 0000000000350ef0 Call Trace: bch2_truncate_folios fs/bcachefs/fs-io.c:354 [inline] bchfs_fpunch+0x115/0x780 fs/bcachefs/fs-io.c:508 bch2_fallocate_dispatch+0x3e4/0x540 fs/bcachefs/fs-io.c:782 vfs_fallocate+0x56b/0x6e0 fs/open.c:327 ksys_fallocate fs/open.c:351 [inline] __do_sys_fallocate fs/open.c:356 [inline] __se_sys_fallocate fs/open.c:354 [inline] __x64_sys_fallocate+0xbc/0x110 fs/open.c:354 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f922ad7fed9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f922bbc4058 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f922af45fa0 RCX: 00007f922ad7fed9 RDX: 000000000000069b RSI: 0000000000000003 RDI: 000000000000000b RBP: 00007f922adf3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000002328 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f922af45fa0 R15: 00007fff7e3c9308