mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
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>
This commit is contained in:
parent
7515c22cc8
commit
129f809d2a
@ -74,6 +74,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fs_context.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/uaccess.h>
|
||||
@ -88,13 +89,21 @@ static LIST_HEAD(service_processors);
|
||||
|
||||
static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode);
|
||||
static void ibmasmfs_create_files (struct super_block *sb);
|
||||
static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent);
|
||||
static int ibmasmfs_fill_super(struct super_block *sb, struct fs_context *fc);
|
||||
|
||||
|
||||
static struct dentry *ibmasmfs_mount(struct file_system_type *fst,
|
||||
int flags, const char *name, void *data)
|
||||
static int ibmasmfs_get_tree(struct fs_context *fc)
|
||||
{
|
||||
return mount_single(fst, flags, data, ibmasmfs_fill_super);
|
||||
return get_tree_single(fc, ibmasmfs_fill_super);
|
||||
}
|
||||
|
||||
static const struct fs_context_operations ibmasmfs_context_ops = {
|
||||
.get_tree = ibmasmfs_get_tree,
|
||||
};
|
||||
|
||||
static int ibmasmfs_init_fs_context(struct fs_context *fc)
|
||||
{
|
||||
fc->ops = &ibmasmfs_context_ops;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct super_operations ibmasmfs_s_ops = {
|
||||
@ -107,12 +116,12 @@ static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;
|
||||
static struct file_system_type ibmasmfs_type = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "ibmasmfs",
|
||||
.mount = ibmasmfs_mount,
|
||||
.init_fs_context = ibmasmfs_init_fs_context,
|
||||
.kill_sb = kill_litter_super,
|
||||
};
|
||||
MODULE_ALIAS_FS("ibmasmfs");
|
||||
|
||||
static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent)
|
||||
static int ibmasmfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
||||
{
|
||||
struct inode *root;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user