diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-24 17:48:30 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:16:28 -0400 |
| commit | fc14f2fef682df677d64a145256dbd263df2aa7b (patch) | |
| tree | 74f6b939fbad959a43c04ec646cd0adc8af5f53a /fs | |
| parent | 848b83a59b772b8f102bc5e3f1187c2fa5676959 (diff) | |
convert get_sb_single() users
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/binfmt_misc.c | 8 | ||||
| -rw-r--r-- | fs/configfs/mount.c | 8 | ||||
| -rw-r--r-- | fs/debugfs/inode.c | 8 | ||||
| -rw-r--r-- | fs/devpts/inode.c | 32 | ||||
| -rw-r--r-- | fs/fuse/control.c | 10 | ||||
| -rw-r--r-- | fs/nfsd/nfsctl.c | 8 | ||||
| -rw-r--r-- | fs/openpromfs/inode.c | 8 | ||||
| -rw-r--r-- | fs/super.c | 25 |
8 files changed, 58 insertions, 49 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 29990f0eee0c..1befe2ec8186 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
| @@ -706,10 +706,10 @@ static int bm_fill_super(struct super_block * sb, void * data, int silent) | |||
| 706 | return err; | 706 | return err; |
| 707 | } | 707 | } |
| 708 | 708 | ||
| 709 | static int bm_get_sb(struct file_system_type *fs_type, | 709 | static struct dentry *bm_mount(struct file_system_type *fs_type, |
| 710 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 710 | int flags, const char *dev_name, void *data) |
| 711 | { | 711 | { |
| 712 | return get_sb_single(fs_type, flags, data, bm_fill_super, mnt); | 712 | return mount_single(fs_type, flags, data, bm_fill_super); |
| 713 | } | 713 | } |
| 714 | 714 | ||
| 715 | static struct linux_binfmt misc_format = { | 715 | static struct linux_binfmt misc_format = { |
| @@ -720,7 +720,7 @@ static struct linux_binfmt misc_format = { | |||
| 720 | static struct file_system_type bm_fs_type = { | 720 | static struct file_system_type bm_fs_type = { |
| 721 | .owner = THIS_MODULE, | 721 | .owner = THIS_MODULE, |
| 722 | .name = "binfmt_misc", | 722 | .name = "binfmt_misc", |
| 723 | .get_sb = bm_get_sb, | 723 | .mount = bm_mount, |
| 724 | .kill_sb = kill_litter_super, | 724 | .kill_sb = kill_litter_super, |
| 725 | }; | 725 | }; |
| 726 | 726 | ||
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index 8c8d64230c2d..7d3607febe1c 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c | |||
| @@ -104,16 +104,16 @@ static int configfs_fill_super(struct super_block *sb, void *data, int silent) | |||
| 104 | return 0; | 104 | return 0; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | static int configfs_get_sb(struct file_system_type *fs_type, | 107 | static struct dentry *configfs_do_mount(struct file_system_type *fs_type, |
| 108 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 108 | int flags, const char *dev_name, void *data) |
| 109 | { | 109 | { |
| 110 | return get_sb_single(fs_type, flags, data, configfs_fill_super, mnt); | 110 | return mount_single(fs_type, flags, data, configfs_fill_super); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | static struct file_system_type configfs_fs_type = { | 113 | static struct file_system_type configfs_fs_type = { |
| 114 | .owner = THIS_MODULE, | 114 | .owner = THIS_MODULE, |
| 115 | .name = "configfs", | 115 | .name = "configfs", |
| 116 | .get_sb = configfs_get_sb, | 116 | .mount = configfs_do_mount, |
| 117 | .kill_sb = kill_litter_super, | 117 | .kill_sb = kill_litter_super, |
| 118 | }; | 118 | }; |
| 119 | 119 | ||
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index a4ed8380e98a..37a8ca7c1222 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
| @@ -135,17 +135,17 @@ static int debug_fill_super(struct super_block *sb, void *data, int silent) | |||
| 135 | return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files); | 135 | return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | static int debug_get_sb(struct file_system_type *fs_type, | 138 | static struct dentry *debug_mount(struct file_system_type *fs_type, |
| 139 | int flags, const char *dev_name, | 139 | int flags, const char *dev_name, |
| 140 | void *data, struct vfsmount *mnt) | 140 | void *data) |
| 141 | { | 141 | { |
| 142 | return get_sb_single(fs_type, flags, data, debug_fill_super, mnt); | 142 | return mount_single(fs_type, flags, data, debug_fill_super); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | static struct file_system_type debug_fs_type = { | 145 | static struct file_system_type debug_fs_type = { |
| 146 | .owner = THIS_MODULE, | 146 | .owner = THIS_MODULE, |
| 147 | .name = "debugfs", | 147 | .name = "debugfs", |
| 148 | .get_sb = debug_get_sb, | 148 | .mount = debug_mount, |
| 149 | .kill_sb = kill_litter_super, | 149 | .kill_sb = kill_litter_super, |
| 150 | }; | 150 | }; |
| 151 | 151 | ||
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 8b3ffd5b5235..1bb547c9cad6 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c | |||
| @@ -331,7 +331,7 @@ static int compare_init_pts_sb(struct super_block *s, void *p) | |||
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | /* | 333 | /* |
| 334 | * devpts_get_sb() | 334 | * devpts_mount() |
| 335 | * | 335 | * |
| 336 | * If the '-o newinstance' mount option was specified, mount a new | 336 | * If the '-o newinstance' mount option was specified, mount a new |
| 337 | * (private) instance of devpts. PTYs created in this instance are | 337 | * (private) instance of devpts. PTYs created in this instance are |
| @@ -345,20 +345,20 @@ static int compare_init_pts_sb(struct super_block *s, void *p) | |||
| 345 | * semantics in devpts while preserving backward compatibility of the | 345 | * semantics in devpts while preserving backward compatibility of the |
| 346 | * current 'single-namespace' semantics. i.e all mounts of devpts | 346 | * current 'single-namespace' semantics. i.e all mounts of devpts |
| 347 | * without the 'newinstance' mount option should bind to the initial | 347 | * without the 'newinstance' mount option should bind to the initial |
| 348 | * kernel mount, like get_sb_single(). | 348 | * kernel mount, like mount_single(). |
| 349 | * | 349 | * |
| 350 | * Mounts with 'newinstance' option create a new, private namespace. | 350 | * Mounts with 'newinstance' option create a new, private namespace. |
| 351 | * | 351 | * |
| 352 | * NOTE: | 352 | * NOTE: |
| 353 | * | 353 | * |
| 354 | * For single-mount semantics, devpts cannot use get_sb_single(), | 354 | * For single-mount semantics, devpts cannot use mount_single(), |
| 355 | * because get_sb_single()/sget() find and use the super-block from | 355 | * because mount_single()/sget() find and use the super-block from |
| 356 | * the most recent mount of devpts. But that recent mount may be a | 356 | * the most recent mount of devpts. But that recent mount may be a |
| 357 | * 'newinstance' mount and get_sb_single() would pick the newinstance | 357 | * 'newinstance' mount and mount_single() would pick the newinstance |
| 358 | * super-block instead of the initial super-block. | 358 | * super-block instead of the initial super-block. |
| 359 | */ | 359 | */ |
| 360 | static int devpts_get_sb(struct file_system_type *fs_type, | 360 | static struct dentry *devpts_mount(struct file_system_type *fs_type, |
| 361 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) | 361 | int flags, const char *dev_name, void *data) |
| 362 | { | 362 | { |
| 363 | int error; | 363 | int error; |
| 364 | struct pts_mount_opts opts; | 364 | struct pts_mount_opts opts; |
| @@ -366,7 +366,7 @@ static int devpts_get_sb(struct file_system_type *fs_type, | |||
| 366 | 366 | ||
| 367 | error = parse_mount_options(data, PARSE_MOUNT, &opts); | 367 | error = parse_mount_options(data, PARSE_MOUNT, &opts); |
| 368 | if (error) | 368 | if (error) |
| 369 | return error; | 369 | return ERR_PTR(error); |
| 370 | 370 | ||
| 371 | if (opts.newinstance) | 371 | if (opts.newinstance) |
| 372 | s = sget(fs_type, NULL, set_anon_super, NULL); | 372 | s = sget(fs_type, NULL, set_anon_super, NULL); |
| @@ -374,7 +374,7 @@ static int devpts_get_sb(struct file_system_type *fs_type, | |||
| 374 | s = sget(fs_type, compare_init_pts_sb, set_anon_super, NULL); | 374 | s = sget(fs_type, compare_init_pts_sb, set_anon_super, NULL); |
| 375 | 375 | ||
| 376 | if (IS_ERR(s)) | 376 | if (IS_ERR(s)) |
| 377 | return PTR_ERR(s); | 377 | return ERR_CAST(s); |
| 378 | 378 | ||
| 379 | if (!s->s_root) { | 379 | if (!s->s_root) { |
| 380 | s->s_flags = flags; | 380 | s->s_flags = flags; |
| @@ -390,13 +390,11 @@ static int devpts_get_sb(struct file_system_type *fs_type, | |||
| 390 | if (error) | 390 | if (error) |
| 391 | goto out_undo_sget; | 391 | goto out_undo_sget; |
| 392 | 392 | ||
| 393 | simple_set_mnt(mnt, s); | 393 | return dget(s->s_root); |
| 394 | |||
| 395 | return 0; | ||
| 396 | 394 | ||
| 397 | out_undo_sget: | 395 | out_undo_sget: |
| 398 | deactivate_locked_super(s); | 396 | deactivate_locked_super(s); |
| 399 | return error; | 397 | return ERR_PTR(error); |
| 400 | } | 398 | } |
| 401 | 399 | ||
| 402 | #else | 400 | #else |
| @@ -404,10 +402,10 @@ out_undo_sget: | |||
| 404 | * This supports only the legacy single-instance semantics (no | 402 | * This supports only the legacy single-instance semantics (no |
| 405 | * multiple-instance semantics) | 403 | * multiple-instance semantics) |
| 406 | */ | 404 | */ |
| 407 | static int devpts_get_sb(struct file_system_type *fs_type, int flags, | 405 | static struct dentry *devpts_mount(struct file_system_type *fs_type, int flags, |
| 408 | const char *dev_name, void *data, struct vfsmount *mnt) | 406 | const char *dev_name, void *data) |
| 409 | { | 407 | { |
| 410 | return get_sb_single(fs_type, flags, data, devpts_fill_super, mnt); | 408 | return mount_single(fs_type, flags, data, devpts_fill_super); |
| 411 | } | 409 | } |
| 412 | #endif | 410 | #endif |
| 413 | 411 | ||
| @@ -421,7 +419,7 @@ static void devpts_kill_sb(struct super_block *sb) | |||
| 421 | 419 | ||
| 422 | static struct file_system_type devpts_fs_type = { | 420 | static struct file_system_type devpts_fs_type = { |
| 423 | .name = "devpts", | 421 | .name = "devpts", |
| 424 | .get_sb = devpts_get_sb, | 422 | .mount = devpts_mount, |
| 425 | .kill_sb = devpts_kill_sb, | 423 | .kill_sb = devpts_kill_sb, |
| 426 | }; | ||
