Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
devpts: Simplify devpts_mount by using mount_nodev
Browse files Browse the repository at this point in the history
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" <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ebiederm authored and gregkh committed Sep 23, 2016
1 parent 180d904 commit c1b241f
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions fs/devpts/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,24 +451,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent)
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)
Expand Down

0 comments on commit c1b241f

Please sign in to comment.