[Devel] [PATCH RHEL7 COMMIT] ve/nsproxy: drop INIT_NSPROXY_COUNT

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 22 03:48:45 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.15
------>
commit 27b56f3ad32d6c341cb23d4ce70ff9b5b124a432
Author: Vladimir Davydov <vdavydov at parallels.com>
Date:   Mon Jun 22 14:48:45 2015 +0400

    ve/nsproxy: drop INIT_NSPROXY_COUNT
    
    In case of CONFIG_VE we init init_nsproxy.count to 2 instead of 1,
    explaining this by the fact that both ve0 and init_task need to hold a
    reference to init_nsproxy. Actually, neither ve0 nor init_task can die,
    so there is absolutely no point in this change, so revert it in order
    not to clutter our kernel patch.
    
    This patch reverts 20db9ba844e49 ("VE/NSPROXY: fix refcounting of
    init_nsproxy") and parts of the initial commit 1da9426dc5c49.
    
    Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 include/linux/init_task.h | 7 -------
 kernel/nsproxy.c          | 2 +-
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 56afd2b..b1bdeb6 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -58,13 +58,6 @@ extern struct fs_struct init_fs;
 	INIT_GROUP_RWSEM(sig)						\
 }
 
-#ifdef CONFIG_VE
-/* one more for ve0 */
-#define INIT_NSPROXY_COUNT	ATOMIC_INIT(2)
-#else
-#define INIT_NSPROXY_COUNT	ATOMIC_INIT(1)
-#endif
-
 extern struct nsproxy init_nsproxy;
 
 #define INIT_SIGHAND(sighand) {						\
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index 769eeec..79983ab 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -29,7 +29,7 @@
 static struct kmem_cache *nsproxy_cachep;
 
 struct nsproxy init_nsproxy = {
-	.count	= INIT_NSPROXY_COUNT,
+	.count	= ATOMIC_INIT(1),
 	.uts_ns	= &init_uts_ns,
 #if defined(CONFIG_POSIX_MQUEUE) || defined(CONFIG_SYSVIPC)
 	.ipc_ns	= &init_ipc_ns,



More information about the Devel mailing list