summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2016-08-02 17:07:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-02 19:35:44 -0400
commit3bd080e4d8f2351ee3e143f0ec9307cc95ae6639 (patch)
tree6a98d4479c9d51c72230beeede5b0382fe5973f5
parenta4691deabf284a601149a067525759939cc563b2 (diff)
ipc: delete "nr_ipc_ns"
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>
-rw-r--r--include/linux/ipc_namespace.h2
-rw-r--r--ipc/msgutil.c2
-rw-r--r--ipc/namespace.c2
3 files changed, 0 insertions, 6 deletions
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index 1eee6bcfcf76..d10e54f03c09 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -63,8 +63,6 @@ struct ipc_namespace {
63}; 63};
64 64
65extern struct ipc_namespace init_ipc_ns; 65extern struct ipc_namespace init_ipc_ns;
66extern atomic_t nr_ipc_ns;
67
68extern spinlock_t mq_lock; 66extern spinlock_t mq_lock;
69 67
70#ifdef CONFIG_SYSVIPC 68#ifdef CONFIG_SYSVIPC
diff --git a/ipc/msgutil.c b/ipc/msgutil.c
index ed81aafd2392..a521999de4f1 100644
--- a/ipc/msgutil.c
+++ b/ipc/msgutil.c
@@ -37,8 +37,6 @@ struct ipc_namespace init_ipc_ns = {
37#endif 37#endif
38}; 38};
39 39
40atomic_t nr_ipc_ns = ATOMIC_INIT(1);
41
42struct msg_msgseg { 40struct msg_msgseg {
43 struct msg_msgseg *next; 41 struct msg_msgseg *next;
44 /* the next part of the message follows immediately */ 42 /* the next part of the message follows immediately */
diff --git a/ipc/namespace.c b/ipc/namespace.c
index 04cb07eb81f1..d87e6baa1323 100644
--- a/ipc/namespace.c
+++ b/ipc/namespace.c
@@ -43,7 +43,6 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
43 kfree(ns); 43 kfree(ns);
44 return ERR_PTR(err); 44 return ERR_PTR(err);
45 } 45 }
46 atomic_inc(&nr_ipc_ns);
47 46
48 sem_init_ns(ns); 47 sem_init_ns(ns);
49 msg_init_ns(ns); 48 msg_init_ns(ns);
@@ -96,7 +95,6 @@ static void free_ipc_ns(struct ipc_namespace *ns)
96 sem_exit_ns(ns); 95 sem_exit_ns(ns);
97 msg_exit_ns(ns); 96 msg_exit_ns(ns);
98 shm_exit_ns(ns); 97 shm_exit_ns(ns);
99 atomic_dec(&nr_ipc_ns);
100 98
101 put_user_ns(ns->user_ns); 99 put_user_ns(ns->user_ns);
102 ns_free_inum(&ns->ns); 100 ns_free_inum(&ns->ns);