(syz.4.18,4382,1):ocfs2_truncate_log_append:5875 ERROR: bug expression: tl_count > ocfs2_truncate_recs_per_inode(osb->sb) || tl_count == 0 (syz.4.18,4382,1):ocfs2_truncate_log_append:5875 ERROR: Truncate record count on #77 invalid wanted 39, actual 40 ------------[ cut here ]------------ kernel BUG at fs/ocfs2/alloc.c:5875! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 4382 Comm: syz.4.18 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 RIP: 0010:ocfs2_truncate_log_append+0x92a/0x940 fs/ocfs2/alloc.c:5869 Code: 0f b7 04 24 4c 89 ef 48 c7 c6 c6 e2 a7 8b ba f3 16 00 00 48 c7 c1 e0 59 47 8a 4d 89 f0 41 89 d9 50 e8 1a 15 1c 00 48 83 c4 08 <0f> 0b e8 ff 43 66 fe 0f 0b e8 f8 43 66 fe 0f 0b 66 0f 1f 44 00 00 RSP: 0018:ffffc9000346ec00 EFLAGS: 00010296 RAX: 7b76b5fb62995700 RBX: 0000000000000027 RCX: 7b76b5fb62995700 RDX: ffffc9000e79a000 RSI: 00000000000214bf RDI: 00000000000214c0 RBP: ffffc9000346ed30 R08: dffffc0000000000 R09: ffffed10172267a8 R10: ffffed10172267a8 R11: 1ffff110172267a7 R12: ffff888071a5fac0 R13: ffffc9000346eca0 R14: 000000000000004d R15: 1ffff1100e34bf58 FS: 00007fd8647906c0(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd86474ed58 CR3: 000000005b831000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ocfs2_remove_btree_range+0x1028/0x1480 fs/ocfs2/alloc.c:5790 ocfs2_commit_truncate+0xab3/0x1b30 fs/ocfs2/alloc.c:7347 ocfs2_truncate_file+0xca4/0x13b0 fs/ocfs2/file.c:505 ocfs2_setattr+0x143b/0x1a10 fs/ocfs2/file.c:1215 notify_change+0xbcd/0xee0 fs/attr.c:505 do_truncate+0x197/0x220 fs/open.c:65 handle_truncate fs/namei.c:3265 [inline] do_open fs/namei.c:3612 [inline] path_openat+0x28af/0x2f30 fs/namei.c:3742 do_filp_open+0x1b3/0x3e0 fs/namei.c:3769 do_sys_openat2+0x142/0x4a0 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fd866528be9 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:00007fd864790038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fd86675ffa0 RCX: 00007fd866528be9 RDX: 0000000000181242 RSI: 0000200000000180 RDI: ffffffffffffff9c RBP: 00007fd8665abe19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000148 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd866760038 R14: 00007fd86675ffa0 R15: 00007ffdde936138 Modules linked in: ---[ end trace df7ecc485d14494a ]--- RIP: 0010:ocfs2_truncate_log_append+0x92a/0x940 fs/ocfs2/alloc.c:5869 Code: 0f b7 04 24 4c 89 ef 48 c7 c6 c6 e2 a7 8b ba f3 16 00 00 48 c7 c1 e0 59 47 8a 4d 89 f0 41 89 d9 50 e8 1a 15 1c 00 48 83 c4 08 <0f> 0b e8 ff 43 66 fe 0f 0b e8 f8 43 66 fe 0f 0b 66 0f 1f 44 00 00 RSP: 0018:ffffc9000346ec00 EFLAGS: 00010296 RAX: 7b76b5fb62995700 RBX: 0000000000000027 RCX: 7b76b5fb62995700 RDX: ffffc9000e79a000 RSI: 00000000000214bf RDI: 00000000000214c0 RBP: ffffc9000346ed30 R08: dffffc0000000000 R09: ffffed10172267a8 R10: ffffed10172267a8 R11: 1ffff110172267a7 R12: ffff888071a5fac0 R13: ffffc9000346eca0 R14: 000000000000004d R15: 1ffff1100e34bf58 FS: 00007fd8647906c0(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0c55f6ee9c CR3: 000000005b831000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400