Commit 933a90bf authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs mount updates from Al Viro:
 "The first part of mount updates.

  Convert filesystems to use the new mount API"

* 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
  mnt_init(): call shmem_init() unconditionally
  constify ksys_mount() string arguments
  don't bother with registering rootfs
  init_rootfs(): don't bother with init_ramfs_fs()
  vfs: Convert smackfs to use the new mount API
  vfs: Convert selinuxfs to use the new mount API
  vfs: Convert securityfs to use the new mount API
  vfs: Convert apparmorfs to use the new mount API
  vfs: Convert openpromfs to use the new mount API
  vfs: Convert xenfs to use the new mount API
  vfs: Convert gadgetfs to use the new mount API
  vfs: Convert oprofilefs to use the new mount API
  vfs: Convert ibmasmfs to use the new mount API
  vfs: Convert qib_fs/ipathfs to use the new mount API
  vfs: Convert efivarfs to use the new mount API
  vfs: Convert configfs to use the new mount API
  vfs: Convert binfmt_misc to use the new mount API
  convenience helper: get_tree_single()
  convenience helper get_tree_nodev()
  vfs: Kill sget_userns()
  ...
parents 5f4fc6d4 037f11b4
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/pseudo_fs.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/capability.h> #include <linux/capability.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
...@@ -600,17 +601,19 @@ pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f) ...@@ -600,17 +601,19 @@ pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f)
/* forward declaration */ /* forward declaration */
static const struct dentry_operations pfmfs_dentry_operations; static const struct dentry_operations pfmfs_dentry_operations;
static struct dentry * static int pfmfs_init_fs_context(struct fs_context *fc)
pfmfs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data)
{ {
return mount_pseudo(fs_type, "pfm:", NULL, &pfmfs_dentry_operations, struct pseudo_fs_context *ctx = init_pseudo(fc, PFMFS_MAGIC);
PFMFS_MAGIC); if (!ctx)
return -ENOMEM;
ctx->dops = &pfmfs_dentry_operations;
return 0;
} }
static struct file_system_type pfm_fs_type = { static struct file_system_type pfm_fs_type = {
.name = "pfmfs", .name = "pfmfs",
.mount = pfmfs_mount, .init_fs_context = pfmfs_init_fs_context,
.kill_sb = kill_anon_super, .kill_sb = kill_anon_super,
}; };
MODULE_ALIAS_FS("pfmfs"); MODULE_ALIAS_FS("pfmfs");
......
...@@ -2104,8 +2104,7 @@ static int rdt_init_fs_context(struct fs_context *fc) ...@@ -2104,8 +2104,7 @@ static int rdt_init_fs_context(struct fs_context *fc)
ctx->kfc.magic = RDTGROUP_SUPER_MAGIC; ctx->kfc.magic = RDTGROUP_SUPER_MAGIC;
fc->fs_private = &ctx->kfc; fc->fs_private = &ctx->kfc;
fc->ops = &rdt_fs_context_ops; fc->ops = &rdt_fs_context_ops;
if (fc->user_ns) put_user_ns(fc->user_ns);
put_user_ns(fc->user_ns);
fc->user_ns = get_user_ns(&init_user_ns); fc->user_ns = get_user_ns(&init_user_ns);
fc->global = true; fc->global = true;
return 0; return 0;
......
...@@ -357,8 +357,7 @@ int devtmpfs_mount(const char *mntdir) ...@@ -357,8 +357,7 @@ int devtmpfs_mount(const char *mntdir)
if (!thread) if (!thread)
return 0; return 0;
err = ksys_mount("devtmpfs", (char *)mntdir, "devtmpfs", MS_SILENT, err = ksys_mount("devtmpfs", mntdir, "devtmpfs", MS_SILENT, NULL);
NULL);
if (err) if (err)
printk(KERN_INFO "devtmpfs: error mounting %i\n", err); printk(KERN_INFO "devtmpfs: error mounting %i\n", err);
else else
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/pseudo_fs.h>
#include <linux/magic.h> #include <linux/magic.h>
#include <linux/genhd.h> #include <linux/genhd.h>
#include <linux/pfn_t.h> #include <linux/pfn_t.h>
...@@ -469,16 +470,19 @@ static const struct super_operations dax_sops = { ...@@ -469,16 +470,19 @@ static const struct super_operations dax_sops = {
.drop_inode = generic_delete_inode, .drop_inode = generic_delete_inode,
}; };
static struct dentry *dax_mount(struct file_system_type *fs_type, static int dax_init_fs_context(struct fs_context *fc)
int flags, const char *dev_name, void *data)
{ {
return mount_pseudo(fs_type, "dax:", &dax_sops, NULL, DAXFS_MAGIC); struct pseudo_fs_context *ctx = init_pseudo(fc, DAXFS_MAGIC);
if (!ctx)
return -ENOMEM;
ctx->ops = &dax_sops;
return 0;
} }
static struct file_system_type dax_fs_type = { static struct file_system_type dax_fs_type = {
.name = "dax", .name = "dax",
.mount = dax_mount, .init_fs_context = dax_init_fs_context,
.kill_sb = kill_anon_super, .kill_sb = kill_anon_super,
}; };
static int dax_test(struct inode *inode, void *data) static int dax_test(struct inode *inode, void *data)
...@@ -665,10 +669,6 @@ static int dax_fs_init(void) ...@@ -665,10 +669,6 @@ static int dax_fs_init(void)
if (!dax_cache) if (!dax_cache)
return -ENOMEM; return -ENOMEM;
rc = register_filesystem(&dax_fs_type);
if (rc)
goto err_register_fs;
dax_mnt = kern_mount(&dax_fs_type); dax_mnt = kern_mount(&dax_fs_type);
if (IS_ERR(dax_mnt)) { if (IS_ERR(dax_mnt)) {
rc = PTR_ERR(dax_mnt); rc = PTR_ERR(dax_mnt);
...@@ -679,8 +679,6 @@ static int dax_fs_init(void) ...@@ -679,8 +679,6 @@ static int dax_fs_init(void)
return 0; return 0;
err_mount: err_mount:
unregister_filesystem(&dax_fs_type);
err_register_fs:
kmem_cache_destroy(dax_cache); kmem_cache_destroy(dax_cache);
return rc; return rc;
...@@ -689,7 +687,6 @@ static int dax_fs_init(void) ...@@ -689,7 +687,6 @@ static int dax_fs_init(void)
static void dax_fs_exit(void) static void dax_fs_exit(void)
{ {
kern_unmount(dax_mnt); kern_unmount(dax_mnt);
unregister_filesystem(&dax_fs_type);
kmem_cache_destroy(dax_cache); kmem_cache_destroy(dax_cache);
} }
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/reservation.h> #include <linux/reservation.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/pseudo_fs.h>
#include <uapi/linux/dma-buf.h> #include <uapi/linux/dma-buf.h>
#include <uapi/linux/magic.h> #include <uapi/linux/magic.h>
...@@ -59,16 +60,20 @@ static const struct dentry_operations dma_buf_dentry_ops = { ...@@ -59,16 +60,20 @@ static const struct dentry_operations dma_buf_dentry_ops = {
static struct vfsmount *dma_buf_mnt; static struct vfsmount *dma_buf_mnt;
static struct dentry *dma_buf_fs_mount(struct file_system_type *fs_type, static int dma_buf_fs_init_context(struct fs_context *fc)
int flags, const char *name, void *data)
{ {
return mount_pseudo(fs_type, "dmabuf:", NULL, &dma_buf_dentry_ops, struct pseudo_fs_context *ctx;
DMA_BUF_MAGIC);
ctx = init_pseudo(fc, DMA_BUF_MAGIC);
if (!ctx)
return -ENOMEM;
ctx->dops = &dma_buf_dentry_ops;
return 0;
} }
static struct file_system_type dma_buf_fs_type = { static struct file_system_type dma_buf_fs_type = {
.name = "dmabuf", .name = "dmabuf",
.mount = dma_buf_fs_mount, .init_fs_context = dma_buf_fs_init_context,
.kill_sb = kill_anon_super, .kill_sb = kill_anon_super,
}; };
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/pseudo_fs.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/srcu.h> #include <linux/srcu.h>
...@@ -535,28 +536,15 @@ EXPORT_SYMBOL(drm_dev_unplug); ...@@ -535,28 +536,15 @@ EXPORT_SYMBOL(drm_dev_unplug);
static int drm_fs_cnt; static int drm_fs_cnt;
static struct vfsmount *drm_fs_mnt; static struct vfsmount *drm_fs_mnt;
static const struct dentry_operations drm_fs_dops = { static int drm_fs_init_fs_context(struct fs_context *fc)
.d_dname = simple_dname,
};
static const struct super_operations drm_fs_sops = {
.statfs = simple_statfs,
};
static struct dentry *drm_fs_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{ {
return mount_pseudo(fs_type, return init_pseudo(fc, 0x010203ff) ? 0 : -ENOMEM;
"drm:",
&drm_fs_sops,
&drm_fs_dops,
0x010203ff);
} }
static struct file_system_type drm_fs_type = { static struct file_system_type drm_fs_type = {
.name = "drm", .name = "drm",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.mount = drm_fs_mount, .init_fs_context = drm_fs_init_fs_context,
.kill_sb = kill_anon_super, .kill_sb = kill_anon_super,
}; };
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/fs_context.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -506,7 +507,7 @@ static int remove_device_files(struct super_block *sb, ...@@ -506,7 +507,7 @@ static int remove_device_files(struct super_block *sb,
* after device init. The direct add_cntr_files() call handles adding * after device init. The direct add_cntr_files() call handles adding
* them from the init code, when the fs is already mounted. * them from the init code, when the fs is already mounted.
*/ */
static int qibfs_fill_super(struct super_block *sb, void *data, int silent) static int qibfs_fill_super(struct super_block *sb, struct fs_context *fc)
{ {
struct qib_devdata *dd; struct qib_devdata *dd;
unsigned long index; unsigned long index;
...@@ -534,17 +535,24 @@ static int qibfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -534,17 +535,24 @@ static int qibfs_fill_super(struct super_block *sb, void *data, int silent)
return ret; return ret;
} }
static struct dentry *qibfs_mount(struct file_system_type *fs_type, int flags, static int qibfs_get_tree(struct fs_context *fc)
const char *dev_name, void *data)
{ {
struct dentry *ret; int ret = get_tree_single(fc, qibfs_fill_super);
if (ret == 0)
ret = mount_single(fs_type, flags, data, qibfs_fill_super); qib_super = fc->root->d_sb;
if (!IS_ERR(ret))
qib_super = ret->d_sb;
return ret; return ret;
} }
static const struct fs_context_operations qibfs_context_ops = {
.get_tree = qibfs_get_tree,
};
static int qibfs_init_fs_context(struct fs_context *fc)
{
fc->ops = &qibfs_context_ops;
return 0;
}
static void qibfs_kill_super(struct super_block *s) static void qibfs_kill_super(struct super_block *s)
{ {
kill_litter_super(s); kill_litter_super(s);
...@@ -583,7 +591,7 @@ int qibfs_remove(struct qib_devdata *dd) ...@@ -583,7 +591,7 @@ int qibfs_remove(struct qib_devdata *dd)
static struct file_system_type qibfs_fs_type = { static struct file_system_type qibfs_fs_type = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "ipathfs", .name = "ipathfs",
.mount = qibfs_mount, .init_fs_context = qibfs_init_fs_context,
.kill_sb = qibfs_kill_super, .kill_sb = qibfs_kill_super,
}; };
MODULE_ALIAS_FS("ipathfs"); MODULE_ALIAS_FS("ipathfs");
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <misc/cxl.h> #include <misc/cxl.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/pseudo_fs.h>
#include <linux/sched/mm.h> #include <linux/sched/mm.h>
#include <linux/mmu_context.h> #include <linux/mmu_context.h>
...@@ -33,21 +34,15 @@ ...@@ -33,21 +34,15 @@
static int cxl_fs_cnt; static int cxl_fs_cnt;
static struct vfsmount *cxl_vfs_mount; static struct vfsmount *cxl_vfs_mount;
static const struct dentry_operations cxl_fs_dops = { static int cxl_fs_init_fs_context(struct fs_context *fc)
.d_dname = simple_dname,
};
static struct dentry *cxl_fs_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{ {
return mount_pseudo(fs_type, "cxl:", NULL, &cxl_fs_dops, return init_pseudo(fc, CXL_PSEUDO_FS_MAGIC) ? 0 : -ENOMEM;
CXL_PSEUDO_FS_MAGIC);
} }
static struct file_system_type cxl_fs_type = { static struct file_system_type cxl_fs_type = {
.name = "cxl", .name = "cxl",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.mount = cxl_fs_mount, .init_fs_context = cxl_fs_init_fs_context,
.kill_sb = kill_anon_super, .kill_sb = kill_anon_super,
}; };
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
*/ */
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/fs_context.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
...@@ -74,13 +75,21 @@ static LIST_HEAD(service_processors); ...@@ -74,13 +75,21 @@ static LIST_HEAD(service_processors);
static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode); static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode);
static void ibmasmfs_create_files (struct super_block *sb); static void ibmasmfs_create_files (struct super_block *sb);
static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent); static int ibmasmfs_fill_super(struct super_block *sb, struct fs_context *fc);
static int ibmasmfs_get_tree(struct fs_context *fc)
{
return get_tree_single(fc, ibmasmfs_fill_super);
}
static struct dentry *ibmasmfs_mount(struct file_system_type *fst, static const struct fs_context_operations ibmasmfs_context_ops = {
int flags, const char *name, void *data) .get_tree = ibmasmfs_get_tree,
};
static int ibmasmfs_init_fs_context(struct fs_context *fc)
{ {
return mount_single(fst, flags, data, ibmasmfs_fill_super); fc->ops = &ibmasmfs_context_ops;
return 0;
} }
static const struct super_operations ibmasmfs_s_ops = { static const struct super_operations ibmasmfs_s_ops = {
...@@ -93,12 +102,12 @@ static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations; ...@@ -93,12 +102,12 @@ static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;
static struct file_system_type ibmasmfs_type = { static struct file_system_type ibmasmfs_type = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "ibmasmfs", .name = "ibmasmfs",
.mount = ibmasmfs_mount, .init_fs_context = ibmasmfs_init_fs_context,
.kill_sb = kill_litter_super, .kill_sb = kill_litter_super,
}; };
MODULE_ALIAS_FS("ibmasmfs"); MODULE_ALIAS_FS("ibmasmfs");
static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent) static int ibmasmfs_fill_super(struct super_block *sb, struct fs_context *fc)
{ {
struct inode *root; struct inode *root;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/pseudo_fs.h>
#include <linux/balloon_compaction.h> #include <linux/balloon_compaction.h>
#include <linux/vmw_vmci_defs.h> #include <linux/vmw_vmci_defs.h>
#include <linux/vmw_vmci_api.h> #include <linux/vmw_vmci_api.h>
...@@ -1728,22 +1729,15 @@ static inline void vmballoon_debugfs_exit(struct vmballoon *b) ...@@ -1728,22 +1729,15 @@ static inline void vmballoon_debugfs_exit(struct vmballoon *b)
#ifdef CONFIG_BALLOON_COMPACTION #ifdef CONFIG_BALLOON_COMPACTION
static struct dentry *vmballoon_mount(struct file_system_type *fs_type, static int vmballoon_init_fs_context(struct fs_context *fc)
int flags, const char *dev_name,
void *data)
{ {
static const struct dentry_operations ops = { return init_pseudo(fc, BALLOON_VMW_MAGIC) ? 0 : -ENOMEM;
.d_dname = simple_dname,
};
return mount_pseudo(fs_type, "balloon-vmware:", NULL, &ops,
BALLOON_VMW_MAGIC);
} }
static struct file_system_type vmballoon_fs = { static struct file_system_type vmballoon_fs = {
.name = "balloon-vmware", .name = "balloon-vmware",
.mount = vmballoon_mount, .init_fs_context = vmballoon_init_fs_context,
.kill_sb = kill_anon_super, .kill_sb = kill_anon_super,
}; };
static struct vfsmount *vmballoon_mnt; static struct vfsmount *vmballoon_mnt;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/oprofile.h> #include <linux/oprofile.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/fs_context.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
...@@ -238,7 +239,7 @@ struct dentry *oprofilefs_mkdir(struct dentry *parent, char const *name) ...@@ -238,7 +239,7 @@ struct dentry *oprofilefs_mkdir(struct dentry *parent, char const *name)
} }
static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent) static int oprofilefs_fill_super(struct super_block *sb, struct fs_context *fc)
{ {
struct inode *root_inode; struct inode *root_inode;
...@@ -263,18 +264,25 @@ static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -263,18 +264,25 @@ static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent)
return 0; return 0;
} }
static int oprofilefs_get_tree(struct fs_context *fc)
static struct dentry *oprofilefs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{ {
return mount_single(fs_type, flags, data, oprofilefs_fill_super); return get_tree_single(fc, oprofilefs_fill_super);
} }
static const struct fs_context_operations oprofilefs_context_ops = {
.get_tree = oprofilefs_get_tree,
};
static int oprofilefs_init_fs_context(struct fs_context *fc)
{
fc->ops = &oprofilefs_context_ops;
return 0;
}
static struct file_system_type oprofilefs_type = { static struct file_system_type oprofilefs_type = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "oprofilefs", .name = "oprofilefs",
.mount = oprofilefs_mount, .init_fs_context = oprofilefs_init_fs_context,
.kill_sb = kill_litter_super, .kill_sb = kill_litter_super,
}; };
MODULE_ALIAS_FS("oprofilefs"); MODULE_ALIAS_FS("oprofilefs");
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/idr.h> #include <linux/idr.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/pseudo_fs.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/sched/signal.h> #include <linux/sched/signal.h>
...@@ -31,31 +32,15 @@ ...@@ -31,31 +32,15 @@
static int ocxlflash_fs_cnt; static int ocxlflash_fs_cnt;
static struct vfsmount *ocxlflash_vfs_mount; static struct vfsmount *ocxlflash_vfs_mount;
static const struct dentry_operations ocxlflash_fs_dops = { static int ocxlflash_fs_init_fs_context(struct fs_context *fc)
.d_dname = simple_dname,
};
/*
* ocxlflash_fs_mount() - mount the pseudo-filesystem
* @fs_type: File system type.
* @flags: Flags for the filesystem.
* @dev_name: Device name associated with the filesystem.
* @data: Data pointer.
*
* Return: pointer to the directory entry structure
*/
static struct dentry *ocxlflash_fs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name,
void *data)
{ {
return mount_pseudo(fs_type, "ocxlflash:", NULL, &ocxlflash_fs_dops, return init_pseudo(fc, OCXLFLASH_FS_MAGIC) ? 0 : -ENOMEM;
OCXLFLASH_FS_MAGIC);
} }
static struct file_system_type ocxlflash_fs_type = { static struct file_system_type ocxlflash_fs_type = {
.name = "ocxlflash", .name = "ocxlflash",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.mount = ocxlflash_fs_mount, .init_fs_context = ocxlflash_fs_init_fs_context,
.kill_sb = kill_anon_super, .kill_sb = kill_anon_super,
}; };
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/fs_context.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/uts.h> #include <linux/uts.h>
#include <linux/wait.h> #include <linux/wait.h>
...@@ -1990,7 +1991,7 @@ static const struct super_operations gadget_fs_operations = { ...@@ -1990,7 +1991,7 @@ static const struct super_operations gadget_fs_operations = {
}; };
static int static int
gadgetfs_fill_super (struct super_block *sb, void *opts, int silent) gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc)
{ {
struct inode *inode; struct inode *inode;
struct dev_data *dev; struct dev_data *dev;
...@@ -2044,11 +2045,19 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent) ...@@ -2044,11 +2045,19 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent)
} }
/* "mount -t gadgetfs path /dev/gadget" ends up here */ /* "mount -t gadgetfs path /dev/gadget" ends up here */
static struct dentry * static int gadgetfs_get_tree(struct fs_context *fc)
gadgetfs_mount (struct file_system_type *t, int flags,
const char *path, void *opts)
{ {
return mount_single (t, flags, opts, gadgetfs_fill_super); return get_tree_single(fc, gadgetfs_fill_super);
}
static const struct fs_context_operations gadgetfs_context_ops = {