Skip to content

Commit 3bd080e

Browse files
Alexey Dobriyantorvalds
authored andcommitted
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>
1 parent a4691de commit 3bd080e

3 files changed

Lines changed: 0 additions & 6 deletions

File tree

‎include/linux/ipc_namespace.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ struct ipc_namespace {
6363
};
6464

6565
extern struct ipc_namespace init_ipc_ns;
66-
extern atomic_t nr_ipc_ns;
67-
6866
extern spinlock_t mq_lock;
6967

7068
#ifdef CONFIG_SYSVIPC

‎ipc/msgutil.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ struct ipc_namespace init_ipc_ns = {
3737
#endif
3838
};
3939

40-
atomic_t nr_ipc_ns = ATOMIC_INIT(1);
41-
4240
struct msg_msgseg {
4341
struct msg_msgseg *next;
4442
/* the next part of the message follows immediately */

‎ipc/namespace.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
4343
kfree(ns);
4444
return ERR_PTR(err);
4545
}
46-
atomic_inc(&nr_ipc_ns);
4746

4847
sem_init_ns(ns);
4948
msg_init_ns(ns);
@@ -96,7 +95,6 @@ static void free_ipc_ns(struct ipc_namespace *ns)
9695
sem_exit_ns(ns);
9796
msg_exit_ns(ns);
9897
shm_exit_ns(ns);
99-
atomic_dec(&nr_ipc_ns);
10098

10199
put_user_ns(ns->user_ns);
102100
ns_free_inum(&ns->ns);

0 commit comments

Comments
 (0)