.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 2014 IBM Corp. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or |
---|
5 | | - * modify it under the terms of the GNU General Public License |
---|
6 | | - * as published by the Free Software Foundation; either version |
---|
7 | | - * 2 of the License, or (at your option) any later version. |
---|
8 | 4 | */ |
---|
9 | 5 | |
---|
10 | 6 | #include <linux/pci.h> |
---|
.. | .. |
---|
13 | 9 | #include <misc/cxl.h> |
---|
14 | 10 | #include <linux/module.h> |
---|
15 | 11 | #include <linux/mount.h> |
---|
| 12 | +#include <linux/pseudo_fs.h> |
---|
16 | 13 | #include <linux/sched/mm.h> |
---|
17 | 14 | #include <linux/mmu_context.h> |
---|
18 | 15 | |
---|
.. | .. |
---|
37 | 34 | static int cxl_fs_cnt; |
---|
38 | 35 | static struct vfsmount *cxl_vfs_mount; |
---|
39 | 36 | |
---|
40 | | -static const struct dentry_operations cxl_fs_dops = { |
---|
41 | | - .d_dname = simple_dname, |
---|
42 | | -}; |
---|
43 | | - |
---|
44 | | -static struct dentry *cxl_fs_mount(struct file_system_type *fs_type, int flags, |
---|
45 | | - const char *dev_name, void *data) |
---|
| 37 | +static int cxl_fs_init_fs_context(struct fs_context *fc) |
---|
46 | 38 | { |
---|
47 | | - return mount_pseudo(fs_type, "cxl:", NULL, &cxl_fs_dops, |
---|
48 | | - CXL_PSEUDO_FS_MAGIC); |
---|
| 39 | + return init_pseudo(fc, CXL_PSEUDO_FS_MAGIC) ? 0 : -ENOMEM; |
---|
49 | 40 | } |
---|
50 | 41 | |
---|
51 | 42 | static struct file_system_type cxl_fs_type = { |
---|
52 | 43 | .name = "cxl", |
---|
53 | 44 | .owner = THIS_MODULE, |
---|
54 | | - .mount = cxl_fs_mount, |
---|
| 45 | + .init_fs_context = cxl_fs_init_fs_context, |
---|
55 | 46 | .kill_sb = kill_anon_super, |
---|
56 | 47 | }; |
---|
57 | 48 | |
---|