Received: by 10.223.185.116 with SMTP id b49csp6411529wrg; Wed, 28 Feb 2018 08:59:59 -0800 (PST) X-Google-Smtp-Source: AH8x225V2pXVAySre8yBTK8LtMNV/nnq+8l42B6fKrIwjCdNGF9cCYXm8CDmDCO+M07z2wuPw1Us X-Received: by 10.101.81.204 with SMTP id i12mr14693701pgq.206.1519837199523; Wed, 28 Feb 2018 08:59:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519837199; cv=none; d=google.com; s=arc-20160816; b=W461xPGxMctOvDB3qNssw+e1mtxsDEyS1EGq+/pC94bhSRASMnt71CtF0kYkCgSJY2 AJ1Pc4Y8+YWUcI4BfqaxeytRM7y6fPyGUkiMOuaACo4odqQVdyOfrsnsxFM/oAif4Wtb Knf5HozaUtMQCiwiFn1yGUZZNM8SNKmnV6m21anW66x1ZCXFjnaJ/erS8ELGyOlCtsk6 D1w1J+0DP/e0uD8t5iifljQPW6pCHujzfUQ841WLOemKxreo9oadR/gRIOjn1L2Nl/IL d28+pXbCCIyedufFlQxUpguIyMCzPdw4hS5AAPsMeDC/xDTpa8t3GgwJd0m4sOhuLsRH Zhcw== 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=njg/BGNs9HjHhNcXDHAPMkC3uz+vZvmQZC73Sn0rCC8=; b=BkZ89pN01aSPuHU5o0fCXE5j0TCsiKDPXld0vIG65d3wDlh+p66wgPNy/DCNtXAPtf vPrSh1N9ioIp3i2c2p0jxFB9dbXrzN3jVufDcisexHxbI/mOvAfCG8ovpiPzXK6/SKkx Z7S+9QrEI3BbIs2hN9YVKSiNthbrRn+/Mc08wnCK7jo9JzUAdLz/XN2O0+sLSsfI+x53 wUkiqJzGryv1nVC0Z5nkuoWjOwAbxw/tpmeVwj+JvOL5mWcE1tJmf+Olk9xy5RzVzm4b EWpSIKJjGZwkhhQml+euujT+vLZb75GZSNEd1k/bgmXwELJStzo1NXBE9Z52WjfIwjpD zj0A== 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 p1-v6si1553753pld.80.2018.02.28.08.59.44; Wed, 28 Feb 2018 08:59:59 -0800 (PST) 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 S933890AbeB1Pwm (ORCPT + 99 others); Wed, 28 Feb 2018 10:52:42 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34406 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932426AbeB1Pwj (ORCPT ); Wed, 28 Feb 2018 10:52:39 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (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 1er3Ys-0006Xb-2T; Wed, 28 Feb 2018 15:22:30 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yh-00009o-NK; Wed, 28 Feb 2018 15:22:19 +0000 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, "Glauber Costa" , "Tonghao Zhang" , "Tonghao Zhang" , "David S. Miller" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 143/254] sctp: Replace use of sockets_allocated with specified macro. In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 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.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Tonghao Zhang commit 8cb38a602478e9f806571f6920b0a3298aabf042 upstream. The patch(180d8cd942ce) replaces all uses of struct sock fields' memory_pressure, memory_allocated, sockets_allocated, and sysctl_mem to accessor macros. But the sockets_allocated field of sctp sock is not replaced at all. Then replace it now for unifying the code. Fixes: 180d8cd942ce ("foundations of per-cgroup memory pressure controlling.") Cc: Glauber Costa Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/sctp/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4021,7 +4021,7 @@ static int sctp_init_sock(struct sock *s SCTP_DBG_OBJCNT_INC(sock); local_bh_disable(); - percpu_counter_inc(&sctp_sockets_allocated); + sk_sockets_allocated_inc(sk); sock_prot_inuse_add(net, sk->sk_prot, 1); /* Nothing can fail after this block, otherwise @@ -4065,7 +4065,7 @@ static void sctp_destroy_sock(struct soc } sctp_endpoint_free(sp->ep); local_bh_disable(); - percpu_counter_dec(&sctp_sockets_allocated); + sk_sockets_allocated_dec(sk); sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); local_bh_enable(); }