[Devel] [PATCH RHEL7 COMMIT] Revert "ve/kobject: new type for VE-aware object introduced"

Konstantin Khorenko khorenko at virtuozzo.com
Wed Dec 27 18:54:17 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-693.11.1.vz7.39.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.11.1.vz7.39.9
------>
commit a45476b3b334a930b8f0eafcd179b6bd9bc979fa
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Wed Dec 27 18:50:21 2017 +0300

    Revert "ve/kobject: new type for VE-aware object introduced"
    
    This reverts commit a378ce448387ad91f7c0c50d17879a1a3b4cc689.
    
    This is a leftover, drop it.
    
    https://jira.sw.ru/browse/PSBM-72008
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 include/linux/ve.h     |  4 ----
 kernel/ve/Makefile     |  2 +-
 kernel/ve/ve-kobject.c | 48 ------------------------------------------------
 kernel/ve/veowner.c    |  2 --
 4 files changed, 1 insertion(+), 55 deletions(-)

diff --git a/include/linux/ve.h b/include/linux/ve.h
index 486fa24d25c0..d62bf4dc8f87 100644
--- a/include/linux/ve.h
+++ b/include/linux/ve.h
@@ -152,10 +152,6 @@ extern unsigned int sysctl_ve_mount_nr;
 #ifdef CONFIG_VE
 #define ve_uevent_seqnum       (get_exec_env()->_uevent_seqnum)
 
-extern struct kobj_ns_type_operations ve_ns_type_operations;
-extern struct kobject * kobject_create_and_add_ve(const char *name,
-						struct kobject *parent);
-
 extern struct kmapset_set ve_sysfs_perms;
 
 extern int vz_security_family_check(struct net *net, int family, int type);
diff --git a/kernel/ve/Makefile b/kernel/ve/Makefile
index f9f77df7e507..76357429fa22 100644
--- a/kernel/ve/Makefile
+++ b/kernel/ve/Makefile
@@ -5,7 +5,7 @@
 # Copyright (c) 2009-2015 Parallels IP Holdings GmbH
 #
 
-obj-$(CONFIG_VE) = ve.o veowner.o hooks.o vzstat_core.o ve-kobject.o
+obj-$(CONFIG_VE) = ve.o veowner.o hooks.o vzstat_core.o
 obj-$(CONFIG_VZ_WDOG) += vzwdog.o
 obj-$(CONFIG_VE_CALLS) += vzmon.o
 
diff --git a/kernel/ve/ve-kobject.c b/kernel/ve/ve-kobject.c
deleted file mode 100644
index e1051bd4e9a7..000000000000
--- a/kernel/ve/ve-kobject.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  kernel/ve/ve-kobject.c
- *
- *  Copyright (c) 2010-2015 Parallels IP Holdings GmbH
- *
- */
-
-#include <linux/ve.h>
-#include <linux/kobject_ns.h>
-
-static const struct kobj_ns_type_operations *ve_child_ns_type(struct kobject *kobj)
-{
-	return &ve_ns_type_operations;
-}
-
-static void ve_kobj_release(struct kobject *kobj)
-{
-	kfree(kobj);
-}
-
-static struct kobj_type ve_kobj_ktype = {
-	.release	= ve_kobj_release,
-	.sysfs_ops	= &kobj_sysfs_ops,
-	.child_ns_type	= ve_child_ns_type,
-};
-
-struct kobject *kobject_create_and_add_ve(const char *name, struct kobject *parent)
-{
-	struct kobject *kobj;
-	int retval;
-
-	kobj = kzalloc(sizeof(*kobj), GFP_KERNEL);
-	if (!kobj)
-		return NULL;
-
-	kobject_init(kobj, &ve_kobj_ktype);
-
-	retval = kobject_add(kobj, parent, "%s", name);
-	if (retval) {
-		printk(KERN_WARNING "%s: kobject_add error: %d\n",
-		       __func__, retval);
-		kobject_put(kobj);
-		kobj = NULL;
-	}
-	return kobj;
-}
-
-
diff --git a/kernel/ve/veowner.c b/kernel/ve/veowner.c
index bb2b6fb8c335..647a878b5473 100644
--- a/kernel/ve/veowner.c
+++ b/kernel/ve/veowner.c
@@ -128,6 +128,4 @@ void init_ve_system(void)
 	prepare_proc();
 #endif
 	prepare_sysctl();
-
-	kobj_ns_type_register(&ve_ns_type_operations);
 }


More information about the Devel mailing list