aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-07-25 03:46:36 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-10-29 04:16:31 -0400
commit3c26ff6e499ee7e6f9f2bc7da5f2f30d80862ecf (patch)
treebd758d7f15f24aed225a64de77cc535785c50f96 /fs/super.c
parentfc14f2fef682df677d64a145256dbd263df2aa7b (diff)
convert get_sb_nodev() users
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/fs/super.c b/fs/super.c
index 6f021a171ac6..f6a7bf1fff2b 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -870,29 +870,42 @@ void kill_block_super(struct super_block *sb)
870EXPORT_SYMBOL(kill_block_super); 870EXPORT_SYMBOL(kill_block_super);
871#endif 871#endif
872 872
873int get_sb_nodev(struct file_system_type *fs_type, 873struct dentry *mount_nodev(struct file_system_type *fs_type,
874 int flags, void *data, 874 int flags, void *data,
875 int (*fill_super)(struct super_block *, void *, int), 875 int (*fill_super)(struct super_block *, void *, int))
876 struct vfsmount *mnt)
877{ 876{
878 int error; 877 int error;
879 struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL); 878 struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL);
880 879
881 if (IS_ERR(s)) 880 if (IS_ERR(s))
882 return PTR_ERR(s); 881 return ERR_CAST(s);
883 882
884 s->s_flags = flags; 883 s->s_flags = flags;
885 884
886 error = fill_super(s, data, flags & MS_SILENT ? 1 : 0); 885 error = fill_super(s, data, flags & MS_SILENT ? 1 : 0);
887 if (error) { 886 if (error) {
888 deactivate_locked_super(s); 887 deactivate_locked_super(s);
889 return error; 888 return ERR_PTR(error);
890 } 889 }
891 s->s_flags |= MS_ACTIVE; 890 s->s_flags |= MS_ACTIVE;
892 simple_set_mnt(mnt, s); 891 return dget(s->s_root);
893 return 0;
894} 892}
893EXPORT_SYMBOL(mount_nodev);
894
895int get_sb_nodev(struct file_system_type *fs_type,
896 int flags, void *data,
897 int (*fill_super)(struct super_block *, void *, int),
898 struct vfsmount *mnt)
899{
900 struct dentry *root;
895 901
902 root = mount_nodev(fs_type, flags, data, fill_super);
903 if (IS_ERR(root))
904 return PTR_ERR(root);
905 mnt->mnt_root = root;
906 mnt->mnt_sb = root->d_sb;
907 return 0;
908}
896EXPORT_SYMBOL(get_sb_nodev); 909EXPORT_SYMBOL(get_sb_nodev);
897 910
898static int compare_single(struct super_block *s, void *p) 911static int compare_single(struct super_block *s, void *p)