Skip to content

Commit 52db59d

Browse files
dhowellsAl Viro
authored andcommitted
vfs: Convert aio to use the new mount API
Convert the aio 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: Benjamin LaHaise <bcrl@kvack.org> cc: linux-aio@kvack.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 31d6d5c commit 52db59d

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

‎fs/aio.c‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <linux/ramfs.h>
4343
#include <linux/percpu-refcount.h>
4444
#include <linux/mount.h>
45+
#include <linux/pseudo_fs.h>
4546

4647
#include <asm/kmap_types.h>
4748
#include <linux/uaccess.h>
@@ -249,14 +250,12 @@ static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages)
249250
return file;
250251
}
251252

252-
static struct dentry *aio_mount(struct file_system_type *fs_type,
253-
int flags, const char *dev_name, void *data)
253+
static int aio_init_fs_context(struct fs_context *fc)
254254
{
255-
struct dentry *root = mount_pseudo(fs_type, NULL, NULL, AIO_RING_MAGIC);
256-
257-
if (!IS_ERR(root))
258-
root->d_sb->s_iflags |= SB_I_NOEXEC;
259-
return root;
255+
if (!init_pseudo(fc, AIO_RING_MAGIC))
256+
return -ENOMEM;
257+
fc->s_iflags |= SB_I_NOEXEC;
258+
return 0;
260259
}
261260

262261
/* aio_setup
@@ -267,7 +266,7 @@ static int __init aio_setup(void)
267266
{
268267
static struct file_system_type aio_fs = {
269268
.name = "aio",
270-
.mount = aio_mount,
269+
.init_fs_context = aio_init_fs_context,
271270
.kill_sb = kill_anon_super,
272271
};
273272
aio_mnt = kern_mount(&aio_fs);

0 commit comments

Comments
 (0)