Re: [syzbot] Re: kernel BUG in ocfs2_commit_truncate()

From: syzbot
Date: Mon Dec 16 2024 - 05:52:32 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.

***

Subject: Re: kernel BUG in ocfs2_commit_truncate()
Author: dmantipov@xxxxxxxxx

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next e25c8d66f6786300b680866c0e0139981273feba

diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index cd3173062ae3..551cb8fb377a 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -1052,7 +1052,8 @@ static void ocfs2_delete_inode(struct inode *inode)
di = (struct ocfs2_dinode *)di_bh->b_data;
/* Skip inode deletion and wait for dio orphan entry recovered
* first */
- if (unlikely(di->i_flags & cpu_to_le32(OCFS2_DIO_ORPHANED_FL))) {
+ if (unlikely(di->i_flags & (cpu_to_le32(OCFS2_DIO_ORPHANED_FL) |
+ cpu_to_le32(OCFS2_ORPHANED_FL)))) {
ocfs2_cleanup_delete_inode(inode, 0);
goto bail_unlock_inode;
}