提交 30db1ae8 编写于 作者: D Dave Kleikamp

JFS: Check for invalid inodes in jfs_delete_inode

Some error paths may iput an invalid inode with i_nlink=0.  jfs should
not try to actually delete such an inode.
Signed-off-by: NDave Kleikamp <shaggy@austin.ibm.com>
上级 da28c120
......@@ -128,6 +128,10 @@ void jfs_delete_inode(struct inode *inode)
{
jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
if (is_bad_inode(inode) ||
(JFS_IP(inode)->fileset != cpu_to_le32(FILESYSTEM_I)))
return;
if (test_cflag(COMMIT_Freewmap, inode))
jfs_free_zero_link(inode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册