aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-03-16 09:07:58 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-03-16 16:48:06 -0400
commit1a102ff92579edeff5e3d5d3c76ca49977898f00 (patch)
tree5585d724c8a996b770bb7a621563a7535a8c0496 /fs/super.c
parent011949811b946bd3b72fca71200f197c6168a5f8 (diff)
vfs: bury ->get_sb()
This is an ex-parrot. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c67
1 files changed, 6 insertions, 61 deletions
diff --git a/fs/super.c b/fs/super.c
index 7e9dd4cc2c01..4bae0ef6110e 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -843,23 +843,6 @@ error:
843} 843}
844EXPORT_SYMBOL(mount_bdev); 844EXPORT_SYMBOL(mount_bdev);
845 845
846int get_sb_bdev(struct file_system_type *fs_type,
847 int flags, const char *dev_name, void *data,
848 int (*fill_super)(struct super_block *, void *, int),
849 struct vfsmount *mnt)
850{
851 struct dentry *root;
852
853 root = mount_bdev(fs_type, flags, dev_name, data, fill_super);
854 if (IS_ERR(root))
855 return PTR_ERR(root);
856 mnt->mnt_root = root;
857 mnt->mnt_sb = root->d_sb;
858 return 0;
859}
860
861EXPORT_SYMBOL(get_sb_bdev);
862
863void kill_block_super(struct super_block *sb) 846void kill_block_super(struct super_block *sb)
864{ 847{
865 struct block_device *bdev = sb->s_bdev; 848 struct block_device *bdev = sb->s_bdev;
@@ -897,22 +880,6 @@ struct dentry *mount_nodev(struct file_system_type *fs_type,
897} 880}
898EXPORT_SYMBOL(mount_nodev); 881EXPORT_SYMBOL(mount_nodev);
899 882
900int get_sb_nodev(struct file_system_type *fs_type,
901 int flags, void *data,
902 int (*fill_super)(struct super_block *, void *, int),
903 struct vfsmount *mnt)
904{
905 struct dentry *root;
906
907 root = mount_nodev(fs_type, flags, data, fill_super);
908 if (IS_ERR(root))
909 return PTR_ERR(root);
910 mnt->mnt_root = root;
911 mnt->mnt_sb = root->d_sb;
912 return 0;
913}
914EXPORT_SYMBOL(get_sb_nodev);
915
916static int compare_single(struct super_block *s, void *p) 883static int compare_single(struct super_block *s, void *p)
917{ 884{
918 return 1; 885 return 1;
@@ -943,22 +910,6 @@ struct dentry *mount_single(struct file_system_type *fs_type,
943} 910}
944EXPORT_SYMBOL(mount_single); 911EXPORT_SYMBOL(mount_single);
945 912
946int get_sb_single(struct file_system_type *fs_type,
947 int flags, void *data,
948 int (*fill_super)(struct super_block *, void *, int),
949 struct vfsmount *mnt)
950{
951 struct dentry *root;
952 root = mount_single(fs_type, flags, data, fill_super);
953 if (IS_ERR(root))
954 return PTR_ERR(root);
955 mnt->mnt_root = root;
956 mnt->mnt_sb = root->d_sb;
957 return 0;
958}
959
960EXPORT_SYMBOL(get_sb_single);
961
962struct vfsmount * 913struct vfsmount *
963vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void *data) 914vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void *data)
964{ 915{
@@ -988,19 +939,13 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void
988 goto out_free_secdata; 939 goto out_free_secdata;
989 } 940 }
990 941
991 if (type->mount) { 942 root = type->mount(type, flags, name, data);
992 root = type->mount(type, flags, name, data); 943 if (IS_ERR(root)) {
993 if (IS_ERR(root)) { 944 error = PTR_ERR(root);
994 error = PTR_ERR(root); 945 goto out_free_secdata;
995 goto out_free_secdata;
996 }
997 mnt->mnt_root = root;
998 mnt->mnt_sb = root->d_sb;
999 } else {
1000 error = type->get_sb(type, flags, name, data, mnt);
1001 if (error < 0)
1002 goto out_free_secdata;
1003 } 946 }
947 mnt->mnt_root = root;
948 mnt->mnt_sb = root->d_sb;
1004 BUG_ON(!mnt->mnt_sb); 949 BUG_ON(!mnt->mnt_sb);
1005 WARN_ON(!mnt->mnt_sb->s_bdi); 950 WARN_ON(!mnt->mnt_sb->s_bdi);
1006 mnt->mnt_sb->s_flags |= MS_BORN; 951 mnt->mnt_sb->s_flags |= MS_BORN;