From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756324AbcGHVoS (ORCPT ); Fri, 8 Jul 2016 17:44:18 -0400 Received: from mail-lf0-f52.google.com ([209.85.215.52]:35504 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755520AbcGHVoG (ORCPT ); Fri, 8 Jul 2016 17:44:06 -0400 Date: Sat, 9 Jul 2016 00:43:56 +0300 From: Alexey Dobriyan To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] ipc: delete "nr_ipc_ns" Message-ID: <20160708214356.GA6785@p183.telecom.by> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Write-only variable. Signed-off-by: Alexey Dobriyan --- include/linux/ipc_namespace.h | 2 -- ipc/msgutil.c | 2 -- ipc/namespace.c | 2 -- 3 files changed, 6 deletions(-) --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h @@ -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 --- a/ipc/msgutil.c +++ b/ipc/msgutil.c @@ -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 */ --- a/ipc/namespace.c +++ b/ipc/namespace.c @@ -40,7 +40,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); @@ -95,7 +94,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);