vfs: Convert ia64 perfmon to use the new mount API

Convert the ia64 perfmon filesystem to the new internal mount API as the old
one will be obsoleted and removed.  This allows greater flexibility in
communication of mount parameters between userspace, the VFS and the
filesystem.

See Documentation/filesystems/mount_api.txt for more information.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Tony Luck <tony.luck@intel.com>
cc: Fenghua Yu <fenghua.yu@intel.com>
cc: linux-ia64@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
David Howells 2019-03-25 16:38:24 +00:00 committed by Al Viro
parent 4a457910a8
commit b06f973fe7
1 changed files with 10 additions and 7 deletions

View File

@ -38,6 +38,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>
@ -599,17 +600,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, 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");