···331331}332332333333/*334334- * devpts_get_sb()334334+ * devpts_mount()335335 *336336 * If the '-o newinstance' mount option was specified, mount a new337337 * (private) instance of devpts. PTYs created in this instance are···345345 * semantics in devpts while preserving backward compatibility of the346346 * current 'single-namespace' semantics. i.e all mounts of devpts347347 * without the 'newinstance' mount option should bind to the initial348348- * kernel mount, like get_sb_single().348348+ * kernel mount, like mount_single().349349 *350350 * Mounts with 'newinstance' option create a new, private namespace.351351 *352352 * NOTE:353353 *354354- * For single-mount semantics, devpts cannot use get_sb_single(),355355- * because get_sb_single()/sget() find and use the super-block from354354+ * For single-mount semantics, devpts cannot use mount_single(),355355+ * because mount_single()/sget() find and use the super-block from356356 * the most recent mount of devpts. But that recent mount may be a357357- * 'newinstance' mount and get_sb_single() would pick the newinstance357357+ * 'newinstance' mount and mount_single() would pick the newinstance358358 * super-block instead of the initial super-block.359359 */360360-static int devpts_get_sb(struct file_system_type *fs_type,361361- int flags, const char *dev_name, void *data, struct vfsmount *mnt)360360+static struct dentry *devpts_mount(struct file_system_type *fs_type,361361+ int flags, const char *dev_name, void *data)362362{363363 int error;364364 struct pts_mount_opts opts;···366366367367 error = parse_mount_options(data, PARSE_MOUNT, &opts);368368 if (error)369369- return error;369369+ return ERR_PTR(error);370370371371 if (opts.newinstance)372372 s = sget(fs_type, NULL, set_anon_super, NULL);···374374 s = sget(fs_type, compare_init_pts_sb, set_anon_super, NULL);375375376376 if (IS_ERR(s))377377- return PTR_ERR(s);377377+ return ERR_CAST(s);378378379379 if (!s->s_root) {380380 s->s_flags = flags;···390390 if (error)391391 goto out_undo_sget;392392393393- simple_set_mnt(mnt, s);394394-395395- return 0;393393+ return dget(s->s_root);396394397395out_undo_sget:398396 deactivate_locked_super(s);399399- return error;397397+ return ERR_PTR(error);400398}401399402400#else···402404 * This supports only the legacy single-instance semantics (no403405 * multiple-instance semantics)404406 */405405-static int devpts_get_sb(struct file_system_type *fs_type, int flags,406406- const char *dev_name, void *data, struct vfsmount *mnt)407407+static struct dentry *devpts_mount(struct file_system_type *fs_type, int flags,408408+ const char *dev_name, void *data)407409{408408- return get_sb_single(fs_type, flags, data, devpts_fill_super, mnt);410410+ return mount_single(fs_type, flags, data, devpts_fill_super);409411}410412#endif411413···419421420422static struct file_system_type devpts_fs_type = {421423 .name = "devpts",422422- .get_sb = devpts_get_sb,424424+ .mount = devpts_mount,423425 .kill_sb = devpts_kill_sb,424426};425427