diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-20 21:57:43 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-05-21 18:31:12 -0400 |
commit | 894680710d813137077ad7cb351b713f64cabbdf (patch) | |
tree | 67cd171f70f8dd938374bf02c1c8d562d08a3f61 /fs/devpts/inode.c | |
parent | a135aa2cd76a1de1a84312e0bb3498a5da76782d (diff) | |
download | linux-894680710d813137077ad7cb351b713f64cabbdf.tar.bz2 |
Simplify devpts_get_sb() failure exits
postpone simple_set_mnt() until we know we won't fail.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/devpts/inode.c')
-rw-r--r-- | fs/devpts/inode.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 0120247b41c0..8b3ffd5b5235 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -384,18 +384,15 @@ static int devpts_get_sb(struct file_system_type *fs_type, s->s_flags |= MS_ACTIVE; } - simple_set_mnt(mnt, s); - memcpy(&(DEVPTS_SB(s))->mount_opts, &opts, sizeof(opts)); error = mknod_ptmx(s); if (error) - goto out_dput; + goto out_undo_sget; - return 0; + simple_set_mnt(mnt, s); -out_dput: - dput(s->s_root); /* undo dget() in simple_set_mnt() */ + return 0; out_undo_sget: deactivate_locked_super(s); |