]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ipc: delete "nr_ipc_ns"
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 2 Aug 2016 21:07:32 +0000 (14:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 2 Aug 2016 23:35:44 +0000 (19:35 -0400)
Write-only variable.

Link: http://lkml.kernel.org/r/20160708214356.GA6785@p183.telecom.by
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/ipc_namespace.h
ipc/msgutil.c
ipc/namespace.c

index 1eee6bcfcf76a43856088b6314c2a52c0b2f10e1..d10e54f03c09661cc724cfb66965b79acf48cf3e 100644 (file)
@@ -63,8 +63,6 @@ struct ipc_namespace {
 };
 
 extern struct ipc_namespace init_ipc_ns;
-extern atomic_t nr_ipc_ns;
-
 extern spinlock_t mq_lock;
 
 #ifdef CONFIG_SYSVIPC
index ed81aafd239263c7523db5f7ae2983770fea06cb..a521999de4f103954e40db932e8903f3ed7e48f1 100644 (file)
@@ -37,8 +37,6 @@ struct ipc_namespace init_ipc_ns = {
 #endif
 };
 
-atomic_t nr_ipc_ns = ATOMIC_INIT(1);
-
 struct msg_msgseg {
        struct msg_msgseg *next;
        /* the next part of the message follows immediately */
index 04cb07eb81f1c148c43915e1eecd57b3cfe9699e..d87e6baa13238d11aca72f0edaae53ca1c220f61 100644 (file)
@@ -43,7 +43,6 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
                kfree(ns);
                return ERR_PTR(err);
        }
-       atomic_inc(&nr_ipc_ns);
 
        sem_init_ns(ns);
        msg_init_ns(ns);
@@ -96,7 +95,6 @@ static void free_ipc_ns(struct ipc_namespace *ns)
        sem_exit_ns(ns);
        msg_exit_ns(ns);
        shm_exit_ns(ns);
-       atomic_dec(&nr_ipc_ns);
 
        put_user_ns(ns->user_ns);
        ns_free_inum(&ns->ns);