Skip to content

Commit

Permalink
convert get_sb_single() users
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Oct 29, 2010
1 parent 848b83a commit fc14f2f
Show file tree
Hide file tree
Showing 25 changed files with 147 additions and 139 deletions.
10 changes: 5 additions & 5 deletions arch/powerpc/platforms/cell/spufs/inode.c
Expand Up @@ -798,17 +798,17 @@ spufs_fill_super(struct super_block *sb, void *data, int silent)
return spufs_create_root(sb, data);
}

static int
spufs_get_sb(struct file_system_type *fstype, int flags,
const char *name, void *data, struct vfsmount *mnt)
static struct dentry *
spufs_mount(struct file_system_type *fstype, int flags,
const char *name, void *data)
{
return get_sb_single(fstype, flags, data, spufs_fill_super, mnt);
return mount_single(fstype, flags, data, spufs_fill_super);
}

static struct file_system_type spufs_type = {
.owner = THIS_MODULE,
.name = "spufs",
.get_sb = spufs_get_sb,
.mount = spufs_mount,
.kill_sb = kill_litter_super,
};

Expand Down
8 changes: 4 additions & 4 deletions arch/s390/hypfs/inode.c
Expand Up @@ -316,10 +316,10 @@ static int hypfs_fill_super(struct super_block *sb, void *data, int silent)
return 0;
}

static int hypfs_get_super(struct file_system_type *fst, int flags,
const char *devname, void *data, struct vfsmount *mnt)
static struct dentry *hypfs_mount(struct file_system_type *fst, int flags,
const char *devname, void *data)
{
return get_sb_single(fst, flags, data, hypfs_fill_super, mnt);
return mount_single(fst, flags, data, hypfs_fill_super);
}

static void hypfs_kill_super(struct super_block *sb)
Expand Down Expand Up @@ -455,7 +455,7 @@ static const struct file_operations hypfs_file_ops = {
static struct file_system_type hypfs_type = {
.owner = THIS_MODULE,
.name = "s390_hypfs",
.get_sb = hypfs_get_super,
.mount = hypfs_mount,
.kill_sb = hypfs_kill_super
};

Expand Down
18 changes: 9 additions & 9 deletions drivers/base/devtmpfs.c
Expand Up @@ -29,33 +29,33 @@
static struct vfsmount *dev_mnt;

#if defined CONFIG_DEVTMPFS_MOUNT
static int dev_mount = 1;
static int mount_dev = 1;
#else
static int dev_mount;
static int mount_dev;
#endif

static DEFINE_MUTEX(dirlock);

static int __init mount_param(char *str)
{
dev_mount = simple_strtoul(str, NULL, 0);
mount_dev = simple_strtoul(str, NULL, 0);
return 1;
}
__setup("devtmpfs.mount=", mount_param);

static int dev_get_sb(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *dev_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{
#ifdef CONFIG_TMPFS
return get_sb_single(fs_type, flags, data, shmem_fill_super, mnt);
return mount_single(fs_type, flags, data, shmem_fill_super);
#else
return get_sb_single(fs_type, flags, data, ramfs_fill_super, mnt);
return mount_single(fs_type, flags, data, ramfs_fill_super);
#endif
}

static struct file_system_type dev_fs_type = {
.name = "devtmpfs",
.get_sb = dev_get_sb,
.mount = dev_mount,
.kill_sb = kill_litter_super,
};

Expand Down Expand Up @@ -351,7 +351,7 @@ int devtmpfs_mount(const char *mntdir)
{
int err;

if (!dev_mount)
if (!mount_dev)
return 0;

if (!dev_mnt)
Expand Down
14 changes: 7 additions & 7 deletions drivers/infiniband/hw/ipath/ipath_fs.c
Expand Up @@ -362,13 +362,13 @@ static int ipathfs_fill_super(struct super_block *sb, void *data,
return ret;
}

static int ipathfs_get_sb(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *ipathfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
int ret = get_sb_single(fs_type, flags, data,
ipathfs_fill_super, mnt);
if (ret >= 0)
ipath_super = mnt->mnt_sb;
struct dentry *ret;
ret = mount_single(fs_type, flags, data, ipathfs_fill_super);
if (!IS_ERR(ret))
ipath_super = ret->d_sb;
return ret;
}

Expand Down Expand Up @@ -411,7 +411,7 @@ int ipathfs_remove_device(struct ipath_devdata *dd)
static struct file_system_type ipathfs_fs_type = {
.owner = THIS_MODULE,
.name = "ipathfs",
.get_sb = ipathfs_get_sb,
.mount = ipathfs_mount,
.kill_sb = ipathfs_kill_super,
};

Expand Down
14 changes: 7 additions & 7 deletions drivers/infiniband/hw/qib/qib_fs.c
Expand Up @@ -555,13 +555,13 @@ static int qibfs_fill_super(struct super_block *sb, void *data, int silent)
return ret;
}

static int qibfs_get_sb(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *qibfs_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{
int ret = get_sb_single(fs_type, flags, data,
qibfs_fill_super, mnt);
if (ret >= 0)
qib_super = mnt->mnt_sb;
struct dentry *ret;
ret = mount_single(fs_type, flags, data, qibfs_fill_super);
if (!IS_ERR(ret))
qib_super = ret->d_sb;
return ret;
}

Expand Down Expand Up @@ -603,7 +603,7 @@ int qibfs_remove(struct qib_devdata *dd)
static struct file_system_type qibfs_fs_type = {
.owner = THIS_MODULE,
.name = "ipathfs",
.get_sb = qibfs_get_sb,
.mount = qibfs_mount,
.kill_sb = qibfs_kill_super,
};

Expand Down
8 changes: 4 additions & 4 deletions drivers/isdn/capi/capifs.c
Expand Up @@ -125,16 +125,16 @@ capifs_fill_super(struct super_block *s, void *data, int silent)
return -ENOMEM;
}

static int capifs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *capifs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_single(fs_type, flags, data, capifs_fill_super, mnt);
return mount_single(fs_type, flags, data, capifs_fill_super);
}

static struct file_system_type capifs_fs_type = {
.owner = THIS_MODULE,
.name = "capifs",
.get_sb = capifs_get_sb,
.mount = capifs_mount,
.kill_sb = kill_anon_super,
};

Expand Down
9 changes: 4 additions & 5 deletions drivers/misc/ibmasm/ibmasmfs.c
Expand Up @@ -91,11 +91,10 @@ static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root);
static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent);


static int ibmasmfs_get_super(struct file_system_type *fst,
int flags, const char *name, void *data,
struct vfsmount *mnt)
static struct dentry *ibmasmfs_mount(struct file_system_type *fst,
int flags, const char *name, void *data)
{
return get_sb_single(fst, flags, data, ibmasmfs_fill_super, mnt);
return mount_single(fst, flags, data, ibmasmfs_fill_super);
}

static const struct super_operations ibmasmfs_s_ops = {
Expand All @@ -108,7 +107,7 @@ static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;
static struct file_system_type ibmasmfs_type = {
.owner = THIS_MODULE,
.name = "ibmasmfs",
.get_sb = ibmasmfs_get_super,
.mount = ibmasmfs_mount,
.kill_sb = kill_litter_super,
};

Expand Down
8 changes: 4 additions & 4 deletions drivers/oprofile/oprofilefs.c
Expand Up @@ -259,17 +259,17 @@ static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent)
}


static int oprofilefs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *oprofilefs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_single(fs_type, flags, data, oprofilefs_fill_super, mnt);
return mount_single(fs_type, flags, data, oprofilefs_fill_super);
}


static struct file_system_type oprofilefs_type = {
.owner = THIS_MODULE,
.name = "oprofilefs",
.get_sb = oprofilefs_get_sb,
.mount = oprofilefs_mount,
.kill_sb = kill_litter_super,
};

Expand Down
8 changes: 4 additions & 4 deletions drivers/usb/core/inode.c
Expand Up @@ -574,16 +574,16 @@ static void fs_remove_file (struct dentry *dentry)

/* --------------------------------------------------------------------- */

static int usb_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *usb_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_single(fs_type, flags, data, usbfs_fill_super, mnt);
return mount_single(fs_type, flags, data, usbfs_fill_super);
}

static struct file_system_type usb_fs_type = {
.owner = THIS_MODULE,
.name = "usbfs",
.get_sb = usb_get_sb,
.mount = usb_mount,
.kill_sb = kill_litter_super,
};

Expand Down
14 changes: 7 additions & 7 deletions drivers/usb/gadget/f_fs.c
Expand Up @@ -1176,9 +1176,9 @@ static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts)

/* "mount -t functionfs dev_name /dev/function" ends up here */

static int
ffs_fs_get_sb(struct file_system_type *t, int flags,
const char *dev_name, void *opts, struct vfsmount *mnt)
static struct dentry *
ffs_fs_mount(struct file_system_type *t, int flags,
const char *dev_name, void *opts)
{
struct ffs_sb_fill_data data = {
.perms = {
Expand All @@ -1194,14 +1194,14 @@ ffs_fs_get_sb(struct file_system_type *t, int flags,

ret = functionfs_check_dev_callback(dev_name);
if (unlikely(ret < 0))
return ret;
return ERR_PTR(ret);

ret = ffs_fs_parse_opts(&data, opts);
if (unlikely(ret < 0))
return ret;
return ERR_PTR(ret);

data.dev_name = dev_name;
return get_sb_single(t, flags, &data, ffs_sb_fill, mnt);
return mount_single(t, flags, &data, ffs_sb_fill);
}

static void
Expand All @@ -1220,7 +1220,7 @@ ffs_fs_kill_sb(struct super_block *sb)
static struct file_system_type ffs_fs_type = {
.owner = THIS_MODULE,
.name = "functionfs",
.get_sb = ffs_fs_get_sb,
.mount = ffs_fs_mount,
.kill_sb = ffs_fs_kill_sb,
};

Expand Down
10 changes: 5 additions & 5 deletions drivers/usb/gadget/inode.c
Expand Up @@ -2097,11 +2097,11 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent)
}

/* "mount -t gadgetfs path /dev/gadget" ends up here */
static int
gadgetfs_get_sb (struct file_system_type *t, int flags,
const char *path, void *opts, struct vfsmount *mnt)
static struct dentry *
gadgetfs_mount (struct file_system_type *t, int flags,
const char *path, void *opts)
{
return get_sb_single (t, flags, opts, gadgetfs_fill_super, mnt);
return mount_single (t, flags, opts, gadgetfs_fill_super);
}

static void
Expand All @@ -2119,7 +2119,7 @@ gadgetfs_kill_sb (struct super_block *sb)
static struct file_system_type gadgetfs_type = {
.owner = THIS_MODULE,
.name = shortname,
.get_sb = gadgetfs_get_sb,
.mount = gadgetfs_mount,
.kill_sb = gadgetfs_kill_sb,
};

Expand Down
8 changes: 4 additions & 4 deletions drivers/xen/xenfs/super.c
Expand Up @@ -121,17 +121,17 @@ static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
return rc;
}

static int xenfs_get_sb(struct file_system_type *fs_type,
static int xenfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name,
void *data, struct vfsmount *mnt)
void *data)
{
return get_sb_single(fs_type, flags, data, xenfs_fill_super, mnt);
return mount_single(fs_type, flags, data, xenfs_fill_super);
}

static struct file_system_type xenfs_type = {
.owner = THIS_MODULE,
.name = "xenfs",
.get_sb = xenfs_get_sb,
.mount = xenfs_mount,
.kill_sb = kill_litter_super,
};

Expand Down
8 changes: 4 additions & 4 deletions fs/binfmt_misc.c
Expand Up @@ -706,10 +706,10 @@ static int bm_fill_super(struct super_block * sb, void * data, int silent)
return err;
}

static int bm_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *bm_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_single(fs_type, flags, data, bm_fill_super, mnt);
return mount_single(fs_type, flags, data, bm_fill_super);
}

static struct linux_binfmt misc_format = {
Expand All @@ -720,7 +720,7 @@ static struct linux_binfmt misc_format = {
static struct file_system_type bm_fs_type = {
.owner = THIS_MODULE,
.name = "binfmt_misc",
.get_sb = bm_get_sb,
.mount = bm_mount,
.kill_sb = kill_litter_super,
};

Expand Down
8 changes: 4 additions & 4 deletions fs/configfs/mount.c
Expand Up @@ -104,16 +104,16 @@ static int configfs_fill_super(struct super_block *sb, void *data, int silent)
return 0;
}

static int configfs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt)
static struct dentry *configfs_do_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_single(fs_type, flags, data, configfs_fill_super, mnt);
return mount_single(fs_type, flags, data, configfs_fill_super);
}

static struct file_system_type configfs_fs_type = {
.owner = THIS_MODULE,
.name = "configfs",
.get_sb = configfs_get_sb,
.mount = configfs_do_mount,
.kill_sb = kill_litter_super,
};

Expand Down
8 changes: 4 additions & 4 deletions fs/debugfs/inode.c
Expand Up @@ -135,17 +135,17 @@ static int debug_fill_super(struct super_block *sb, void *data, int silent)
return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files);
}

static int debug_get_sb(struct file_system_type *fs_type,
static struct dentry *debug_mount(struct file_system_type *fs_type,
int flags, const char *dev_name,
void *data, struct vfsmount *mnt)
void *data)
{
return get_sb_single(fs_type, flags, data, debug_fill_super, mnt);
return mount_single(fs_type, flags, data, debug_fill_super);
}

static struct file_system_type debug_fs_type = {
.owner = THIS_MODULE,
.name = "debugfs",
.get_sb = debug_get_sb,
.mount = debug_mount,
.kill_sb = kill_litter_super,
};

Expand Down

0 comments on commit fc14f2f

Please sign in to comment.