diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-07-25 03:46:36 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-29 04:16:31 -0400 |
commit | 3c26ff6e499ee7e6f9f2bc7da5f2f30d80862ecf (patch) | |
tree | bd758d7f15f24aed225a64de77cc535785c50f96 /fs/super.c | |
parent | fc14f2fef682df677d64a145256dbd263df2aa7b (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.c | 27 |
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) | |||
870 | EXPORT_SYMBOL(kill_block_super); | 870 | EXPORT_SYMBOL(kill_block_super); |
871 | #endif | 871 | #endif |
872 | 872 | ||
873 | int get_sb_nodev(struct file_system_type *fs_type, | 873 | struct 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 | } |
893 | EXPORT_SYMBOL(mount_nodev); | ||
894 | |||
895 | int 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 | } | ||
896 | EXPORT_SYMBOL(get_sb_nodev); | 909 | EXPORT_SYMBOL(get_sb_nodev); |
897 | 910 | ||
898 | static int compare_single(struct super_block *s, void *p) | 911 | static int compare_single(struct super_block *s, void *p) |