diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2016-09-14 14:53:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-23 05:31:31 -0400 |
commit | c1b241f0c1cfdba6ad90afd5036fa60781bbc363 (patch) | |
tree | 0520690147a57814b063e596f4ae02c7cb552d77 | |
parent | 180d904442023dfb01c2cdbbf4d17ecd0972081d (diff) |
devpts: Simplify devpts_mount by using mount_nodev
Now that all of the work of setting up a superblock has been moved to
devpts_fill_super simplify devpts_mount by calling mount_nodev instead
of rolling mount_nodev by hand.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/devpts/inode.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 43773543a783..a48b40b0bd1e 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c | |||
@@ -451,24 +451,7 @@ fail: | |||
451 | static struct dentry *devpts_mount(struct file_system_type *fs_type, | 451 | static struct dentry *devpts_mount(struct file_system_type *fs_type, |
452 | int flags, const char *dev_name, void *data) | 452 | int flags, const char *dev_name, void *data) |
453 | { | 453 | { |
454 | int error; | 454 | return mount_nodev(fs_type, flags, data, devpts_fill_super); |
455 | struct super_block *s; | ||
456 | |||
457 | s = sget(fs_type, NULL, set_anon_super, flags, NULL); | ||
458 | if (IS_ERR(s)) | ||
459 | return ERR_CAST(s); | ||
460 | |||
461 | if (!s->s_root) { | ||
462 | error = devpts_fill_super(s, data, flags & MS_SILENT ? 1 : 0); | ||
463 | if (error) | ||
464 | goto out_undo_sget; | ||
465 | s->s_flags |= MS_ACTIVE; | ||
466 | } | ||
467 | return dget(s->s_root); | ||
468 | |||
469 | out_undo_sget: | ||
470 | deactivate_locked_super(s); | ||
471 | return ERR_PTR(error); | ||
472 | } | 455 | } |
473 | 456 | ||
474 | static void devpts_kill_sb(struct super_block *sb) | 457 | static void devpts_kill_sb(struct super_block *sb) |