提交 b5d72cdc 编写于 作者: M Mike Marshall

orangefs: don't let orangefs_iget return NULL.

Suggested by Dan Carpenter.
Signed-off-by: NMike Marshall <hubcap@omnibond.com>
上级 56249998
......@@ -405,7 +405,11 @@ struct inode *orangefs_iget(struct super_block *sb,
orangefs_test_inode,
orangefs_set_inode,
ref);
if (!inode || !(inode->i_state & I_NEW))
if (!inode)
return ERR_PTR(-ENOMEM);
if (!(inode->i_state & I_NEW))
return inode;
error = orangefs_inode_getattr(inode, 1, 1, STATX_ALL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册