Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2227114imm; Thu, 7 Jun 2018 07:22:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLZWVeK+qE0gMgpyWheVjG/If0JFkftu8irx3ROamIzz5Gnq9DSPX7cT1xPRl0DZCkUWNFC X-Received: by 2002:a17:902:b18b:: with SMTP id s11-v6mr2330059plr.190.1528381325123; Thu, 07 Jun 2018 07:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528381325; cv=none; d=google.com; s=arc-20160816; b=w8OsgcE/Bjh6LEnRvNxYPVUBQUhBZ1Zeq01DMJYM855ZFY5TA7JQx+3lr26pSUnii6 AIERpUE84VVzxu9izLm6xLpWOsOjemBSBAAk1hySwb9LEGHODb2VQDkruvkQYEMBkvq4 iTxi5pAzUf/DLxUETUfa0Mks2x04taR6aNdowsu1nFBmqqB5gnRKMxIl0xs59BzH6Az3 bdHwnagyfTKs6HsnNVoNgrw3mUMJjnLEw/6KQcYO2WsMOyFFfhUz1RGXwMuh9KcZ2oBN Af0YF53nP167FeWf8f5tALllzP3+jbadA9ksBoaowAoBq8pbIE9+fXJrJtiFPqi5c9Ik nxhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=UZGbHXfd2Vw0V5sptw8ERQUtb2Qp8tlxXx3mRW7C5Sg=; b=r2IBhESzNaAmnBUu5bmMJU0onUIuQnsyK1GosqZWpCzUi71nHNvlLeMrpFRFdGuLR3 WOjRlOzdJIi+N6Wn1ZRu+Xs0N+8gT/97kn/eJoQaMyRchr5QBHWUnonCZeutAvTOLMIe zgYA6ZfOleLx3ubNNNJiTLbzQWFxMqxQZt/J3QkGRYvZsNGn7c7UzOSOUOqzkxDIISQn kN5j52vHjkmfpKB9dmi8rA98uEL1c8SSzIjjEAJ56KXaWd9DW5oHTHrPRjwGA9UlqqvG 6an7h6dLqJPyiursTGxy3BCKICvTz4tjClblYFpQ7pP79iTs63B5wA4vXjwKVOguCmrm dEAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l13-v6si9271933pff.261.2018.06.07.07.21.49; Thu, 07 Jun 2018 07:22:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933462AbeFGOTY (ORCPT + 99 others); Thu, 7 Jun 2018 10:19:24 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:39512 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933089AbeFGOJN (ORCPT ); Thu, 7 Jun 2018 10:09:13 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbD-0005Zo-Ar; Thu, 07 Jun 2018 15:09:11 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb9-00038d-TZ; Thu, 07 Jun 2018 15:09:07 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "David S. Miller" , "Guillaume Nault" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 287/410] l2tp: remove l2tp_tunnel_count and l2tp_session_count In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Guillaume Nault commit c7fa745d988812c4dea7dbc645f025c5bfa4917e upstream. These variables have never been used. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/l2tp/l2tp_core.c | 10 ---------- 1 file changed, 10 deletions(-) --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -99,8 +99,6 @@ struct l2tp_skb_cb { #define L2TP_SKB_CB(skb) ((struct l2tp_skb_cb *) &skb->cb[sizeof(struct inet_skb_parm)]) -static atomic_t l2tp_tunnel_count; -static atomic_t l2tp_session_count; static struct workqueue_struct *l2tp_wq; /* per-net private data for this module */ @@ -419,10 +417,6 @@ int l2tp_session_register(struct l2tp_se hlist_add_head(&session->hlist, head); write_unlock_bh(&tunnel->hlist_lock); - /* Ignore management session in session count value */ - if (session->session_id != 0) - atomic_inc(&l2tp_session_count); - return 0; err_tlock_pnlock: @@ -1327,7 +1321,6 @@ static void l2tp_tunnel_destruct(struct spin_lock_bh(&pn->l2tp_tunnel_list_lock); list_del_rcu(&tunnel->list); spin_unlock_bh(&pn->l2tp_tunnel_list_lock); - atomic_dec(&l2tp_tunnel_count); l2tp_tunnel_closeall(tunnel); @@ -1749,7 +1742,6 @@ int l2tp_tunnel_create(struct net *net, /* Add tunnel to our list */ INIT_LIST_HEAD(&tunnel->list); - atomic_inc(&l2tp_tunnel_count); /* Bump the reference count. The tunnel context is deleted * only when this drops to zero. Must be done before list insertion @@ -1795,8 +1787,6 @@ void l2tp_session_free(struct l2tp_sessi if (tunnel) { BUG_ON(tunnel->magic != L2TP_TUNNEL_MAGIC); - if (session->session_id != 0) - atomic_dec(&l2tp_session_count); sock_put(tunnel->sock); session->tunnel = NULL; l2tp_tunnel_dec_refcount(tunnel);