Skip to content

Commit

Permalink
ipc: delete "nr_ipc_ns"
Browse files Browse the repository at this point in the history
Write-only variable.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexey Dobriyan authored and torvalds committed Aug 2, 2016
1 parent a4691de commit 3bd080e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions include/linux/ipc_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions ipc/msgutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 0 additions & 2 deletions ipc/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3bd080e

Please sign in to comment.