diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-26 05:16:50 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:17:03 -0400 |
commit | ceefda6931806972ecf550bd8231dce4a4178953 (patch) | |
tree | 46ed42a053f1ed43c3c110a21637a7b071657c8a | |
parent | aed1d84f98738bcc1c605e1ff442de9890441315 (diff) |
switch get_sb_ns() users
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/super.c | 14 | ||||
-rw-r--r-- | include/linux/fs.h | 5 | ||||
-rw-r--r-- | ipc/mqueue.c | 8 |
3 files changed, 12 insertions, 15 deletions
diff --git a/fs/super.c b/fs/super.c index f6a7bf1fff2b..ca696155cd9a 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -715,15 +715,14 @@ static int ns_set_super(struct super_block *sb, void *data) | |||
715 | return set_anon_super(sb, NULL); | 715 | return set_anon_super(sb, NULL); |
716 | } | 716 | } |
717 | 717 | ||
718 | int get_sb_ns(struct file_system_type *fs_type, int flags, void *data, | 718 | struct dentry *mount_ns(struct file_system_type *fs_type, int flags, |
719 | int (*fill_super)(struct super_block *, void *, int), | 719 | void *data, int (*fill_super)(struct super_block *, void *, int)) |
720 | struct vfsmount *mnt) | ||
721 | { | 720 | { |
722 | struct super_block *sb; | 721 | struct super_block *sb; |
723 | 722 | ||
724 | sb = sget(fs_type, ns_test_super, ns_set_super, data); | 723 | sb = sget(fs_type, ns_test_super, ns_set_super, data); |
725 | if (IS_ERR(sb)) | 724 | if (IS_ERR(sb)) |
726 | return PTR_ERR(sb); | 725 | return ERR_CAST(sb); |
727 | 726 | ||
728 | if (!sb->s_root) { | 727 | if (!sb->s_root) { |
729 | int err; | 728 | int err; |
@@ -731,17 +730,16 @@ int get_sb_ns(struct file_system_type *fs_type, int flags, void *data, | |||
731 | err = fill_super(sb, data, flags & MS_SILENT ? 1 : 0); | 730 | err = fill_super(sb, data, flags & MS_SILENT ? 1 : 0); |
732 | if (err) { | 731 | if (err) { |
733 | deactivate_locked_super(sb); | 732 | deactivate_locked_super(sb); |
734 | return err; | 733 | return ERR_PTR(err); |
735 | } | 734 | } |
736 | 735 | ||
737 | sb->s_flags |= MS_ACTIVE; | 736 | sb->s_flags |= MS_ACTIVE; |
738 | } | 737 | } |
739 | 738 | ||
740 | simple_set_mnt(mnt, sb); | 739 | return dget(sb->s_root); |
741 | return 0; | ||
742 | } | 740 | } |
743 | 741 | ||
744 | EXPORT_SYMBOL(get_sb_ns); | 742 | EXPORT_SYMBOL(mount_ns); |
745 | 743 | ||
746 | #ifdef CONFIG_BLOCK | 744 | #ifdef CONFIG_BLOCK |
747 | static int set_bdev_super(struct super_block *s, void *data) | 745 | static int set_bdev_super(struct super_block *s, void *data) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 43e6cfb5cbb3..4d07902bc50c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1789,9 +1789,8 @@ struct file_system_type { | |||
1789 | struct lock_class_key i_alloc_sem_key; | 1789 | struct lock_class_key i_alloc_sem_key; |
1790 | }; | 1790 | }; |
1791 | 1791 | ||
1792 | extern int get_sb_ns(struct file_system_type *fs_type, int flags, void *data, | 1792 | extern struct dentry *mount_ns(struct file_system_type *fs_type, int flags, |
1793 | int (*fill_super)(struct super_block *, void *, int), | 1793 | void *data, int (*fill_super)(struct super_block *, void *, int)); |
1794 | struct vfsmount *mnt); | ||
1795 | extern struct dentry *mount_bdev(struct file_system_type *fs_type, | 1794 | extern struct dentry *mount_bdev(struct file_system_type *fs_type, |
1796 | int flags, const char *dev_name, void *data, | 1795 | int flags, const char *dev_name, void *data, |
1797 | int (*fill_super)(struct super_block *, void *, int)); | 1796 | int (*fill_super)(struct super_block *, void *, int)); |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 3a61ffefe884..035f4399edbc 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -211,13 +211,13 @@ out: | |||
211 | return error; | 211 | return error; |
212 | } | 212 | } |
213 | 213 | ||
214 | static int mqueue_get_sb(struct file_system_type *fs_type, | 214 | static struct dentry *mqueue_mount(struct file_system_type *fs_type, |
215 | int flags, const char *dev_name, | 215 | int flags, const char *dev_name, |
216 | void *data, struct vfsmount *mnt) | 216 | void *data) |
217 | { | 217 | { |
218 | if (!(flags & MS_KERNMOUNT)) | 218 | if (!(flags & MS_KERNMOUNT)) |
219 | data = current->nsproxy->ipc_ns; | 219 | data = current->nsproxy->ipc_ns; |
220 | return get_sb_ns(fs_type, flags, data, mqueue_fill_super, mnt); | 220 | return mount_ns(fs_type, flags, data, mqueue_fill_super); |
221 | } | 221 | } |
222 | 222 | ||
223 | static void init_once(void *foo) | 223 | static void init_once(void *foo) |
@@ -1232,7 +1232,7 @@ static const struct super_operations mqueue_super_ops = { | |||
1232 | 1232 | ||
1233 | static struct file_system_type mqueue_fs_type = { | 1233 | static struct file_system_type mqueue_fs_type = { |
1234 | .name = "mqueue", | 1234 | .name = "mqueue", |
1235 | .get_sb = mqueue_get_sb, | 1235 | .mount = mqueue_mount, |
1236 | .kill_sb = kill_litter_super, | 1236 | .kill_sb = kill_litter_super, |
1237 | }; | 1237 | }; |
1238 | 1238 | ||