diff options
-rw-r--r-- | fs/aio.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/ramfs.h> | 42 | #include <linux/ramfs.h> |
43 | #include <linux/percpu-refcount.h> | 43 | #include <linux/percpu-refcount.h> |
44 | #include <linux/mount.h> | 44 | #include <linux/mount.h> |
45 | #include <linux/pseudo_fs.h> | ||
45 | 46 | ||
46 | #include <asm/kmap_types.h> | 47 | #include <asm/kmap_types.h> |
47 | #include <linux/uaccess.h> | 48 | #include <linux/uaccess.h> |
@@ -249,14 +250,12 @@ static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages) | |||
249 | return file; | 250 | return file; |
250 | } | 251 | } |
251 | 252 | ||
252 | static struct dentry *aio_mount(struct file_system_type *fs_type, | 253 | static int aio_init_fs_context(struct fs_context *fc) |
253 | int flags, const char *dev_name, void *data) | ||
254 | { | 254 | { |
255 | struct dentry *root = mount_pseudo(fs_type, NULL, NULL, AIO_RING_MAGIC); | 255 | if (!init_pseudo(fc, AIO_RING_MAGIC)) |
256 | 256 | return -ENOMEM; | |
257 | if (!IS_ERR(root)) | 257 | fc->s_iflags |= SB_I_NOEXEC; |
258 | root->d_sb->s_iflags |= SB_I_NOEXEC; | 258 | return 0; |
259 | return root; | ||
260 | } | 259 | } |
261 | 260 | ||
262 | /* aio_setup | 261 | /* aio_setup |
@@ -267,7 +266,7 @@ static int __init aio_setup(void) | |||
267 | { | 266 | { |
268 | static struct file_system_type aio_fs = { | 267 | static struct file_system_type aio_fs = { |
269 | .name = "aio", | 268 | .name = "aio", |
270 | .mount = aio_mount, | 269 | .init_fs_context = aio_init_fs_context, |
271 | .kill_sb = kill_anon_super, | 270 | .kill_sb = kill_anon_super, |
272 | }; | 271 | }; |
273 | aio_mnt = kern_mount(&aio_fs); | 272 | aio_mnt = kern_mount(&aio_fs); |