提交 26d83ded 编写于 作者: S Steven Whitehouse

[GFS2] Fix OOM error handling

Fix the OOM error handling in inode.c where it was possible for
a NULL pointer to be dereferenced.
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 4a221953
......@@ -157,6 +157,9 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, struct gfs2_inum *inum,
struct gfs2_glock *io_gl;
int error;
if (!inode)
return ERR_PTR(-ENOBUFS);
if (inode->i_state & I_NEW) {
struct gfs2_sbd *sdp = GFS2_SB(inode);
umode_t mode = DT2IF(type);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册