diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 3f99ab2886955dd74467ea3d1ac00daeba046f5e..d45ecef7511659e65b78bc02a5696da79e32f3be 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1179,8 +1179,14 @@ int f2fs_remove_inode_page(struct inode *inode) f2fs_put_dnode(&dn); return -EIO; } - f2fs_bug_on(F2FS_I_SB(inode), - inode->i_blocks != 0 && inode->i_blocks != 8); + + if (unlikely(inode->i_blocks != 0 && inode->i_blocks != 8)) { + f2fs_msg(F2FS_I_SB(inode)->sb, KERN_WARNING, + "Inconsistent i_blocks, ino:%lu, iblocks:%llu", + inode->i_ino, + (unsigned long long)inode->i_blocks); + set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK); + } /* will put inode & node pages */ err = truncate_node(&dn);