Re: [syzbot] [f2fs?] WARNING in f2fs_rename2
From: Leo Stone
Date: Tue Nov 26 2024 - 12:28:43 EST
This looks like the same image with a deleted inode as in:
https://syzkaller.appspot.com/bug?extid=b01a36acd7007e273a83
#syz test
---
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;
}