aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2016-04-19 17:52:53 -0500
committerEric W. Biederman <ebiederm@xmission.com>2016-09-22 13:32:12 -0500
commitec0a9ba6f201bbb4801344aa11c5d13c1ca27675 (patch)
tree51d0977823bd825e94ff6ff3dea0e3fe02681608 /fs
parentdevpts: Move the creation of /dev/pts/ptmx into fill_super (diff)
downloadlinux-dev-ec0a9ba6f201bbb4801344aa11c5d13c1ca27675.tar.xz
linux-dev-ec0a9ba6f201bbb4801344aa11c5d13c1ca27675.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/devpts/inode.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index f3277f711b25..5e216749bd96 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -451,24 +451,7 @@ fail:
static struct dentry *devpts_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
- int error;
- struct super_block *s;
-
- s = sget(fs_type, NULL, set_anon_super, flags, NULL);
- if (IS_ERR(s))
- return ERR_CAST(s);
-
- if (!s->s_root) {
- error = devpts_fill_super(s, data, flags & MS_SILENT ? 1 : 0);
- if (error)
- goto out_undo_sget;
- s->s_flags |= MS_ACTIVE;
- }
- return dget(s->s_root);
-
-out_undo_sget:
- deactivate_locked_super(s);
- return ERR_PTR(error);
+ return mount_nodev(fs_type, flags, data, devpts_fill_super);
}
static void devpts_kill_sb(struct super_block *sb)