| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * IBM ASM Service Processor Device Driver |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 6 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 7 | | - * (at your option) any later version. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | | - * GNU General Public License for more details. |
|---|
| 13 | | - * |
|---|
| 14 | | - * You should have received a copy of the GNU General Public License |
|---|
| 15 | | - * along with this program; if not, write to the Free Software |
|---|
| 16 | | - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 17 | 4 | * |
|---|
| 18 | 5 | * Copyright (C) IBM Corporation, 2004 |
|---|
| 19 | 6 | * |
|---|
| 20 | 7 | * Author: Max Asböck <amax@us.ibm.com> |
|---|
| 21 | | - * |
|---|
| 22 | 8 | */ |
|---|
| 23 | 9 | |
|---|
| 24 | 10 | /* |
|---|
| .. | .. |
|---|
| 74 | 60 | */ |
|---|
| 75 | 61 | |
|---|
| 76 | 62 | #include <linux/fs.h> |
|---|
| 63 | +#include <linux/fs_context.h> |
|---|
| 77 | 64 | #include <linux/pagemap.h> |
|---|
| 78 | 65 | #include <linux/slab.h> |
|---|
| 79 | 66 | #include <linux/uaccess.h> |
|---|
| .. | .. |
|---|
| 88 | 75 | |
|---|
| 89 | 76 | static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode); |
|---|
| 90 | 77 | static void ibmasmfs_create_files (struct super_block *sb); |
|---|
| 91 | | -static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent); |
|---|
| 78 | +static int ibmasmfs_fill_super(struct super_block *sb, struct fs_context *fc); |
|---|
| 92 | 79 | |
|---|
| 93 | | - |
|---|
| 94 | | -static struct dentry *ibmasmfs_mount(struct file_system_type *fst, |
|---|
| 95 | | - int flags, const char *name, void *data) |
|---|
| 80 | +static int ibmasmfs_get_tree(struct fs_context *fc) |
|---|
| 96 | 81 | { |
|---|
| 97 | | - return mount_single(fst, flags, data, ibmasmfs_fill_super); |
|---|
| 82 | + return get_tree_single(fc, ibmasmfs_fill_super); |
|---|
| 83 | +} |
|---|
| 84 | + |
|---|
| 85 | +static const struct fs_context_operations ibmasmfs_context_ops = { |
|---|
| 86 | + .get_tree = ibmasmfs_get_tree, |
|---|
| 87 | +}; |
|---|
| 88 | + |
|---|
| 89 | +static int ibmasmfs_init_fs_context(struct fs_context *fc) |
|---|
| 90 | +{ |
|---|
| 91 | + fc->ops = &ibmasmfs_context_ops; |
|---|
| 92 | + return 0; |
|---|
| 98 | 93 | } |
|---|
| 99 | 94 | |
|---|
| 100 | 95 | static const struct super_operations ibmasmfs_s_ops = { |
|---|
| .. | .. |
|---|
| 107 | 102 | static struct file_system_type ibmasmfs_type = { |
|---|
| 108 | 103 | .owner = THIS_MODULE, |
|---|
| 109 | 104 | .name = "ibmasmfs", |
|---|
| 110 | | - .mount = ibmasmfs_mount, |
|---|
| 105 | + .init_fs_context = ibmasmfs_init_fs_context, |
|---|
| 111 | 106 | .kill_sb = kill_litter_super, |
|---|
| 112 | 107 | }; |
|---|
| 113 | 108 | MODULE_ALIAS_FS("ibmasmfs"); |
|---|
| 114 | 109 | |
|---|
| 115 | | -static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent) |
|---|
| 110 | +static int ibmasmfs_fill_super(struct super_block *sb, struct fs_context *fc) |
|---|
| 116 | 111 | { |
|---|
| 117 | 112 | struct inode *root; |
|---|
| 118 | 113 | |
|---|