Skip to contentSkip to conversation

s390: Make hypfs more s390 specific

PATCH New Michael Holzheu 1 participant 1 message May 9, 2006 s390

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 s390: Make hypfs more s390 specific

- Rename filesystem from "hypfs" to "s390-hypfs"
- Create /sys/hypervisor/s390 instead of /sys/hypervisor as mount point for s390-hypfs.
- Rename kernel config option from "HYPFS_FS" to "S390_HYPFS_FS"

---

 arch/s390/Kconfig        |    3 ++-
 arch/s390/hypfs/Makefile |    2 +-
 arch/s390/hypfs/inode.c  |   23 ++++++++++++-----------
 3 files changed, 15 insertions(+), 13 deletions(-)
arch/s390/Kconfig +2 -1
diff -urpN linux-2.6.17-rc3-mm1-sys-hypervisor/arch/s390/Kconfig linux-2.6.17-rc3-mm1-sys-hypervisor-hypfs/arch/s390/Kconfig
@@ -446,8 +446,9 @@ config NO_IDLE_HZ_INIT
 	  The HZ timer is switched off in idle by default. That means the
 	  HZ timer is already disabled at boot time.
 
-config HYPFS_FS
+config S390_HYPFS_FS
 	bool "s390 hypervisor file system support"
+	select SYS_HYPERVISOR
 	default y
 	help
 	  This is a virtual file system intended to provide accounting
arch/s390/hypfs/Makefile +1 -1
diff -urpN linux-2.6.17-rc3-mm1-sys-hypervisor/arch/s390/hypfs/Makefile linux-2.6.17-rc3-mm1-sys-hypervisor-hypfs/arch/s390/hypfs/Makefile
@@ -2,6 +2,6 @@
 # Makefile for the linux hypfs filesystem routines.
 #
 
-obj-$(CONFIG_HYPFS_FS) += hypfs.o
+obj-$(CONFIG_S390_HYPFS_FS) += hypfs.o
 
 hypfs-objs := inode.o hypfs_diag.o
arch/s390/hypfs/inode.c +12 -11
diff -urpN linux-2.6.17-rc3-mm1-sys-hypervisor/arch/s390/hypfs/inode.c linux-2.6.17-rc3-mm1-sys-hypervisor-hypfs/arch/s390/hypfs/inode.c
@@ -422,7 +422,7 @@ static struct file_operations hypfs_file
 
 static struct file_system_type hypfs_type = {
 	.owner		= THIS_MODULE,
-	.name		= "hypfs",
+	.name		= "s390-hypfs",
 	.get_sb		= hypfs_get_super,
 	.kill_sb	= kill_litter_super
 };
@@ -433,7 +433,7 @@ static struct super_operations hypfs_s_o
 	.put_super	= hypfs_put_super
 };
 
-static decl_subsys(hypervisor, NULL, NULL);
+static decl_subsys(s390, NULL, NULL);
 
 static int __init hypfs_init(void)
 {
@@ -443,21 +443,22 @@ static int __init hypfs_init(void)
 		return -ENODATA;
 	if (hypfs_diag_init()) {
 		rc = -ENODATA;
-		goto err_msg;
+		goto fail_diag;
 	}
-	rc = subsystem_register(&hypervisor_subsys);
+	kset_set_kset_s(&s390_subsys, hypervisor_subsys);
+	rc = subsystem_register(&s390_subsys);
 	if (rc)
-		goto err_diag;
+		goto fail_sysfs;
 	rc = register_filesystem(&hypfs_type);
 	if (rc)
-		goto err_sysfs;
+		goto fail_filesystem;
 	return 0;
 
-err_sysfs:
-	subsystem_unregister(&hypervisor_subsys);
-err_diag:
+fail_filesystem:
+	subsystem_unregister(&s390_subsys);
+fail_sysfs:
 	hypfs_diag_exit();
-err_msg:
+fail_diag:
 	printk(KERN_ERR "hypfs: Initialization failed with rc = %i.\n", rc);
 	return rc;
 }
@@ -466,7 +467,7 @@ static void __exit hypfs_exit(void)
 {
 	hypfs_diag_exit();
 	unregister_filesystem(&hypfs_type);
-	subsystem_unregister(&hypervisor_subsys);
+	subsystem_unregister(&s390_subsys);
 }
 
 module_init(hypfs_init)