summaryrefslogtreecommitdiff
path: root/drivers/dax
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-03-25 16:38:24 +0000
committerAl Viro <viro@zeniv.linux.org.uk>2019-05-25 18:06:12 -0400
commit75d4e06f049ffb059fdf7e81c0c4c9fab2ba60e4 (patch)
treef8d46231a7de1d59058dc3bef14c96f6f28109f9 /drivers/dax
parentfba9be49701a8e89a691beffb11bfa97df8f0c9f (diff)
vfs: Convert dax to use the new mount API
Convert the dax 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: Dan Williams <dan.j.williams@intel.com> cc: Vishal Verma <vishal.l.verma@intel.com> cc: Keith Busch <keith.busch@intel.com> cc: Dave Jiang <dave.jiang@intel.com> cc: linux-nvdimm@lists.01.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/dax')
-rw-r--r--drivers/dax/super.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index f83814eea5ad..a93225c0a623 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -13,6 +13,7 @@
#include <linux/pagemap.h>
#include <linux/module.h>
#include <linux/mount.h>
+#include <linux/pseudo_fs.h>
#include <linux/magic.h>
#include <linux/genhd.h>
#include <linux/pfn_t.h>
@@ -437,16 +438,19 @@ static const struct super_operations dax_sops = {
.drop_inode = generic_delete_inode,
};
-static struct dentry *dax_mount(struct file_system_type *fs_type,
- int flags, const char *dev_name, void *data)
+static int dax_init_fs_context(struct fs_context *fc)
{
- return mount_pseudo(fs_type, &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 = {
- .name = "dax",
- .mount = dax_mount,
- .kill_sb = kill_anon_super,
+ .name = "dax",
+ .init_fs_context = dax_init_fs_context,
+ .kill_sb = kill_anon_super,
};
static int dax_test(struct inode *inode, void *data)