Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vfs: Convert ibmasmfs to use the new mount API

Convert the ibmasmfs 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: Arnd Bergmann <arnd@arndb.de>
cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by

David Howells and committed by
Al Viro
129f809d 7515c22c

+16 -7
+16 -7
drivers/misc/ibmasm/ibmasmfs.c
··· 74 74 */ 75 75 76 76 #include <linux/fs.h> 77 + #include <linux/fs_context.h> 77 78 #include <linux/pagemap.h> 78 79 #include <linux/slab.h> 79 80 #include <linux/uaccess.h> ··· 89 88 90 89 static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode); 91 90 static void ibmasmfs_create_files (struct super_block *sb); 92 - static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent); 91 + static int ibmasmfs_fill_super(struct super_block *sb, struct fs_context *fc); 93 92 94 - 95 - static struct dentry *ibmasmfs_mount(struct file_system_type *fst, 96 - int flags, const char *name, void *data) 93 + static int ibmasmfs_get_tree(struct fs_context *fc) 97 94 { 98 - return mount_single(fst, flags, data, ibmasmfs_fill_super); 95 + return get_tree_single(fc, ibmasmfs_fill_super); 96 + } 97 + 98 + static const struct fs_context_operations ibmasmfs_context_ops = { 99 + .get_tree = ibmasmfs_get_tree, 100 + }; 101 + 102 + static int ibmasmfs_init_fs_context(struct fs_context *fc) 103 + { 104 + fc->ops = &ibmasmfs_context_ops; 105 + return 0; 99 106 } 100 107 101 108 static const struct super_operations ibmasmfs_s_ops = { ··· 116 107 static struct file_system_type ibmasmfs_type = { 117 108 .owner = THIS_MODULE, 118 109 .name = "ibmasmfs", 119 - .mount = ibmasmfs_mount, 110 + .init_fs_context = ibmasmfs_init_fs_context, 120 111 .kill_sb = kill_litter_super, 121 112 }; 122 113 MODULE_ALIAS_FS("ibmasmfs"); 123 114 124 - static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent) 115 + static int ibmasmfs_fill_super(struct super_block *sb, struct fs_context *fc) 125 116 { 126 117 struct inode *root; 127 118