kmod-redhat-oracleasm/SOURCES/0001-oracleasm-driver-repla...

64 lines
1.8 KiB
Diff

From 21a2130b7a9c10d8f36d130420a43db4e363b41f Mon Sep 17 00:00:00 2001
From: Ming Lei <ming.lei@redhat.com>
Date: Wed, 16 Sep 2020 10:54:38 +0800
Subject: [PATCH 1/3] oracleasm: driver: replace fs_context with mount_pseudo
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
drivers/block/oracleasm/driver.c | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/drivers/block/oracleasm/driver.c b/drivers/block/oracleasm/driver.c
index 50f2333..7844036 100644
--- a/drivers/block/oracleasm/driver.c
+++ b/drivers/block/oracleasm/driver.c
@@ -66,7 +66,6 @@
#include <linux/slab.h>
#include <linux/blkdev.h>
#include <linux/mount.h>
-#include <linux/pseudo_fs.h>
#include <linux/parser.h>
#include <linux/backing-dev.h>
#include <linux/compat.h>
@@ -333,22 +332,16 @@ static struct super_operations asmdisk_sops = {
.evict_inode = asmdisk_evict_inode,
};
-
-static int asmdisk_init_fs_context(struct fs_context *fc)
+struct dentry *asmdisk_mount(struct file_system_type *fs_type,
+ int flags, const char *dev_name, void *data)
{
- struct pseudo_fs_context *ctx = init_pseudo(fc, 0x61736D64);
-
- if (!ctx)
- return -ENOMEM;
- ctx->ops = &asmdisk_sops;
-
- return 0;
+ return mount_pseudo(fs_type, "asmdisk:", &asmdisk_sops, NULL, 0x61736D64);
}
static struct file_system_type asmdisk_type = {
.name = "asmdisk",
.kill_sb = kill_anon_super,
- .init_fs_context = asmdisk_init_fs_context,
+ .mount = asmdisk_mount,
};
static struct vfsmount *asmdisk_mnt;
@@ -2733,8 +2726,8 @@ static void __exit exit_asmfs_fs(void)
destroy_inodecache();
}
-module_init(init_asmfs_fs)
-module_exit(exit_asmfs_fs)
+module_init(init_asmfs_fs);
+module_exit(exit_asmfs_fs);
MODULE_LICENSE("GPL");
MODULE_VERSION(ASM_MODULE_VERSION);
MODULE_AUTHOR("Joel Becker, Martin K. Petersen <martin.petersen@oracle.com>");
--
2.13.6