convert get_sb_nodev() users

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2010-07-25 11:46:36 +04:00
parent fc14f2fef6
commit 3c26ff6e49
17 changed files with 87 additions and 73 deletions

View File

@@ -870,29 +870,42 @@ void kill_block_super(struct super_block *sb)
EXPORT_SYMBOL(kill_block_super);
#endif
int get_sb_nodev(struct file_system_type *fs_type,
struct dentry *mount_nodev(struct file_system_type *fs_type,
int flags, void *data,
int (*fill_super)(struct super_block *, void *, int),
struct vfsmount *mnt)
int (*fill_super)(struct super_block *, void *, int))
{
int error;
struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL);
if (IS_ERR(s))
return PTR_ERR(s);
return ERR_CAST(s);
s->s_flags = flags;
error = fill_super(s, data, flags & MS_SILENT ? 1 : 0);
if (error) {
deactivate_locked_super(s);
return error;
return ERR_PTR(error);
}
s->s_flags |= MS_ACTIVE;
simple_set_mnt(mnt, s);
return dget(s->s_root);
}
EXPORT_SYMBOL(mount_nodev);
int get_sb_nodev(struct file_system_type *fs_type,
int flags, void *data,
int (*fill_super)(struct super_block *, void *, int),
struct vfsmount *mnt)
{
struct dentry *root;
root = mount_nodev(fs_type, flags, data, fill_super);
if (IS_ERR(root))
return PTR_ERR(root);
mnt->mnt_root = root;
mnt->mnt_sb = root->d_sb;
return 0;
}
EXPORT_SYMBOL(get_sb_nodev);
static int compare_single(struct super_block *s, void *p)