Re: [syzbot] Re: [syzbot] [f2fs?] WARNING in f2fs_delete_entry

From: syzbot
Date: Sat Nov 23 2024 - 20:37:20 EST


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

***

Subject: Re: [syzbot] [f2fs?] WARNING in f2fs_delete_entry
Author: leocstone@xxxxxxxxx

#syz test

---
fs/f2fs/inode.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 1ed86df343a5..65f1dc32f173 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -372,6 +372,12 @@ static bool sanity_check_inode(struct inode *inode, struct page *node_page)
return false;
}

+ if (inode->i_nlink == 0) {
+ f2fs_warn(sbi, "%s: inode (ino=%lx) has a link count of 0",
+ __func__, inode->i_ino);
+ return false;
+ }
+
return true;
}

--
2.43.0