提交 88a0a53d 编写于 作者: J Julia Lawall 提交者: Al Viro

fs/romfs: correct error-handling code

romfs_fill_super() assumes that romfs_iget() returns NULL when
it fails.  romfs_iget() actually returns ERR_PTR(-ve) in that
case...
Signed-off-by: NJulia Lawall <julia@diku.dk>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 f8439806
......@@ -528,7 +528,7 @@ static int romfs_fill_super(struct super_block *sb, void *data, int silent)
pos = (ROMFH_SIZE + len + 1 + ROMFH_PAD) & ROMFH_MASK;
root = romfs_iget(sb, pos);
if (!root)
if (IS_ERR(root))
goto error;
sb->s_root = d_alloc_root(root);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册