Web lists-archives.com

[PATCH 03/38] vfs: Convert aio to fs_context




Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
cc: Benjamin LaHaise <bcrl@xxxxxxxxx>
cc: linux-aio@xxxxxxxxx
---

 fs/aio.c |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index 38b741aef0bf..42bf0c83da66 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -42,6 +42,7 @@
 #include <linux/ramfs.h>
 #include <linux/percpu-refcount.h>
 #include <linux/mount.h>
+#include <linux/fs_context.h>
 
 #include <asm/kmap_types.h>
 #include <linux/uaccess.h>
@@ -250,15 +251,11 @@ static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages)
 	return file;
 }
 
-static struct dentry *aio_mount(struct file_system_type *fs_type,
-				int flags, const char *dev_name, void *data)
+static int aio_init_fs_context(struct fs_context *fc)
 {
-	struct dentry *root = mount_pseudo(fs_type, "aio:", NULL, NULL,
-					   AIO_RING_MAGIC);
-
-	if (!IS_ERR(root))
-		root->d_sb->s_iflags |= SB_I_NOEXEC;
-	return root;
+	fc->s_iflags |= SB_I_NOEXEC;
+	return vfs_init_pseudo_fs_context(fc, "aio:",
+					  NULL, NULL, NULL, AIO_RING_MAGIC);
 }
 
 /* aio_setup
@@ -269,7 +266,7 @@ static int __init aio_setup(void)
 {
 	static struct file_system_type aio_fs = {
 		.name		= "aio",
-		.mount		= aio_mount,
+		.init_fs_context = aio_init_fs_context,
 		.kill_sb	= kill_anon_super,
 	};
 	aio_mnt = kern_mount(&aio_fs);