diff options
Diffstat (limited to 'fs/devpts')
-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, | |||
384 | s->s_flags |= MS_ACTIVE; | 384 | s->s_flags |= MS_ACTIVE; |
385 | } | 385 | } |
386 | 386 | ||
387 | simple_set_mnt(mnt, s); | ||
388 | |||
389 | memcpy(&(DEVPTS_SB(s))->mount_opts, &opts, sizeof(opts)); | 387 | memcpy(&(DEVPTS_SB(s))->mount_opts, &opts, sizeof(opts)); |
390 | 388 | ||
391 | error = mknod_ptmx(s); | 389 | error = mknod_ptmx(s); |
392 | if (error) | 390 | if (error) |
393 | goto out_dput; | 391 | goto out_undo_sget; |
394 | 392 | ||
395 | return 0; | 393 | simple_set_mnt(mnt, s); |
396 | 394 | ||
397 | out_dput: | 395 | return 0; |
398 | dput(s->s_root); /* undo dget() in simple_set_mnt() */ | ||
399 | 396 | ||
400 | out_undo_sget: | 397 | out_undo_sget: |
401 | deactivate_locked_super(s); | 398 | deactivate_locked_super(s); |