提交 89468071 编写于 作者: A Al Viro

Simplify devpts_get_sb() failure exits

postpone simple_set_mnt() until we know we won't fail.
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 a135aa2c
...@@ -384,18 +384,15 @@ static int devpts_get_sb(struct file_system_type *fs_type, ...@@ -384,18 +384,15 @@ static int devpts_get_sb(struct file_system_type *fs_type,
s->s_flags |= MS_ACTIVE; s->s_flags |= MS_ACTIVE;
} }
simple_set_mnt(mnt, s);
memcpy(&(DEVPTS_SB(s))->mount_opts, &opts, sizeof(opts)); memcpy(&(DEVPTS_SB(s))->mount_opts, &opts, sizeof(opts));
error = mknod_ptmx(s); error = mknod_ptmx(s);
if (error) if (error)
goto out_dput; goto out_undo_sget;
return 0; simple_set_mnt(mnt, s);
out_dput: return 0;
dput(s->s_root); /* undo dget() in simple_set_mnt() */
out_undo_sget: out_undo_sget:
deactivate_locked_super(s); deactivate_locked_super(s);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册