[RHEL7,COMMIT] Revert "ve/kobject: introduce new namespace tag and operations for VE"

Submitted by Konstantin Khorenko on Dec. 27, 2017, 3:54 p.m.

Details

Message ID 201712271554.vBRFsNKG013702@finist_ce7.work
State New
Series "Revert "ve/sysfs: allow symlinks between tagged and generic directories""
Headers show

Commit Message

Konstantin Khorenko Dec. 27, 2017, 3:54 p.m.
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 96c237a55998da1ccd2f3bc97c9c7df0e6526792
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date:   Wed Dec 27 18:50:55 2017 +0300

    Revert "ve/kobject: introduce new namespace tag and operations for VE"
    
    This reverts commit dd253c2ecea95a4b918a73341be166bd6b1cf09f.
    
    This is a leftover, drop it.
    
    https://jira.sw.ru/browse/PSBM-72008
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
    Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 fs/sysfs/ve.c              | 29 -----------------------------
 include/linux/kobject_ns.h |  1 -
 2 files changed, 30 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/sysfs/ve.c b/fs/sysfs/ve.c
index 4c6f9ce4d5c0..25d0811653ec 100644
--- a/fs/sysfs/ve.c
+++ b/fs/sysfs/ve.c
@@ -10,37 +10,8 @@ 
 #include <linux/module.h>
 #include <linux/uaccess.h>
 #include <linux/ve.h>
-#include <net/sock.h>
 #include "sysfs.h"
 
-static void *ve_grab_current_ns(void)
-{
-	return get_ve(get_exec_env());
-}
-
-static const void *ve_initial_ns(void)
-{
-	return get_ve0();
-}
-
-static void ve_drop_ns(void *p)
-{
-	put_ve(p);
-}
-
-const void *ve_netlink_ns(struct sock *sk)
-{
-	return sock_net(sk)->owner_ve;
-}
-
-struct kobj_ns_type_operations ve_ns_type_operations = {
-	.type = KOBJ_NS_TYPE_VE,
-	.grab_current_ns = ve_grab_current_ns,
-	.netlink_ns = ve_netlink_ns,
-	.initial_ns = ve_initial_ns,
-	.drop_ns = ve_drop_ns,
-};
-
 static bool sysfs_perms_shown(struct ve_struct *ve, struct sysfs_dirent *sd)
 {
 	if (!ve) /* default_sysfs_permissions */
diff --git a/include/linux/kobject_ns.h b/include/linux/kobject_ns.h
index b1395aa7bef5..f66b065a8b5f 100644
--- a/include/linux/kobject_ns.h
+++ b/include/linux/kobject_ns.h
@@ -27,7 +27,6 @@  struct kobject;
 enum kobj_ns_type {
 	KOBJ_NS_TYPE_NONE = 0,
 	KOBJ_NS_TYPE_NET,
-	KOBJ_NS_TYPE_VE,
 	KOBJ_NS_TYPES
 };