convert get_sb_mtd() users to ->mount()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2010-07-25 00:56:46 +04:00
parent 152a083666
commit 848b83a59b
4 changed files with 36 additions and 49 deletions

View File

@ -552,20 +552,19 @@ error_rsb:
/*
* get a superblock for mounting
*/
static int romfs_get_sb(struct file_system_type *fs_type,
static struct dentry *romfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name,
void *data, struct vfsmount *mnt)
void *data)
{
int ret = -EINVAL;
struct dentry *ret = ERR_PTR(-EINVAL);
#ifdef CONFIG_ROMFS_ON_MTD
ret = get_sb_mtd(fs_type, flags, dev_name, data, romfs_fill_super,
mnt);
ret = mount_mtd(fs_type, flags, dev_name, data, romfs_fill_super);
#endif
#ifdef CONFIG_ROMFS_ON_BLOCK
if (ret == -EINVAL)
ret = get_sb_bdev(fs_type, flags, dev_name, data,
romfs_fill_super, mnt);
if (ret == ERR_PTR(-EINVAL))
ret = mount_bdev(fs_type, flags, dev_name, data,
romfs_fill_super);
#endif
return ret;
}
@ -592,7 +591,7 @@ static void romfs_kill_sb(struct super_block *sb)
static struct file_system_type romfs_fs_type = {
.owner = THIS_MODULE,
.name = "romfs",
.get_sb = romfs_get_sb,
.mount = romfs_mount,
.kill_sb = romfs_kill_sb,
.fs_flags = FS_REQUIRES_DEV,
};