Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2724938pxf; Sun, 14 Mar 2021 09:31:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyntp2Hb0j44T6xIMNUjzGfy/dsRlZZw4gq20PYQ3/QPzdkKmuK1Uc6/zb6fWd1MrdPrhPa X-Received: by 2002:aa7:cc94:: with SMTP id p20mr25853888edt.353.1615739474600; Sun, 14 Mar 2021 09:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615739474; cv=none; d=google.com; s=arc-20160816; b=VNlUYKtgX3mwcFM2v4XgZTf5/XFSu4zJDfWFrA1QUepb58sclCydtoN36rizi/kbF/ XgQInb8yd5r0m6Hu6U9RWGx12iECmrOso4B0ZYdKFSKjSRXf3bW6lNeBa912+ykvw5fj 4Po9AMUOXO84TXt1Iu60bkqkGO+BAxNUt06JqTeoA/pvTYb/guWm1YEjL/eRM2+Ym7yY 1M3Og4826X2jTo3+hHq+SgjKXpFfTLJKCYS7LBv3R0gADChWGGLnoS2NYrLhRrJVMBb8 v24IlVBCYgkM616SPD4mrEJ+pdj4cU8wFZTrYzvS1kh+O6FlqthKo4u7RTXkvpdqN1PU hI0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=91rq3bqjKdvo7l94WNjyc/wnGE/INBtalXqtBAm/ssE=; b=QQlh68CO9Ap+C1EGe3y0s5JRzrKRLlvQ1WyD/R8ofNetrtY6w7SLJZrYqp5/wUWdpR FQS0L2EwRoNxYgwxpj38Z/CbX9qHtfBUia5iIVO+aHr4VZD80JCn+soDcEfrrO8Gei01 GEt52tCe5DrWEuKt1/5Qmwm1N2manndpH8FtOMZ7rRUAbZLJux00qChxMSwTE/oJ8YcV HhN3yc22XK51l4MbQ5aG/njCzhkVZloB2UdcugMQHbr0YDEL8VG7gaLISYn/CgdWnHf4 kfEBPyPaUaxb+XV7m1yzTqsNDNd/5NWCbRZDL2UjjT81fHC66vjRrG5WGsfZAWfTSouf uFEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ozQk2bLY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gr2si9191994ejb.65.2021.03.14.09.30.52; Sun, 14 Mar 2021 09:31:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ozQk2bLY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233560AbhCNQZR (ORCPT + 99 others); Sun, 14 Mar 2021 12:25:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233529AbhCNQZF (ORCPT ); Sun, 14 Mar 2021 12:25:05 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4EB8C061574 for ; Sun, 14 Mar 2021 09:25:04 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id x13so4476522wrs.9 for ; Sun, 14 Mar 2021 09:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=91rq3bqjKdvo7l94WNjyc/wnGE/INBtalXqtBAm/ssE=; b=ozQk2bLYQhJ/74b9+MTplzRMhQi+den7GhlqVDflk/uNPbLhjTd0ylF1gz5DAjEBY1 wG6n94tfL+MGFijwtx5BXKlQ1VfaK7Vce6I8J+DIpHf9JvVuaKsOA/aWTKF/kECbUtJe 4UHVzSCQfws0ALXEXOFDV9aoYWL4OAScUVDvuohGNFk7NH0L+3GFOvbJ2TOpeQysHHUt K9elDMo6dBaB/GbznHW7aFuq9NknmT9Bu+B6U4jT4YPw7sFntuaA/0ockJbPLt+kSZBO sXoUPgpYo1T172fvttVgD2hMmyEwes2Vjsp+c9J8DFS2zEj+MBAMbl9lY6xmhRqpI0WU zs1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=91rq3bqjKdvo7l94WNjyc/wnGE/INBtalXqtBAm/ssE=; b=HU0hMFRtFd7zUgh0q+0+sNeV9AzernSJNX2Biq1ETT6LABboSxwo1q8pA5hpcS2xQF rXZ9yUu8eFp9Quw7qkD7IIk79zkj18rPAaF9U43tCYCeYp1Os498u79DJZK4EPnCy+JB agL6ZpWPTRLuD0W5FC1Zr/0XhQdXN5NPGlYRSxyoyuDIn/rVLhzkFF5uoFbBr8afuNpP 2DxNjp50ljm/Kpyb3+vt0YoY/lxsUtxSFdYP4U08WWAXZK+EQsFIci4pTP5qkBJkR+ot tXBCNpr3mJ3kxmo4DFsAQM2HZbDBuJpGuP4rlP0sfpE4QkPxaF1cFrhhHLFZyL5Nges9 XHyg== X-Gm-Message-State: AOAM530H0d0OD3CRuqulDSgzR6KXByQeR0yCYd3Dp/XwIkIxG4+i33YH DiNsrZT2635HiLMpCF7/W4UNpcY/MA== X-Received: by 2002:adf:fe09:: with SMTP id n9mr23789386wrr.104.1615739103557; Sun, 14 Mar 2021 09:25:03 -0700 (PDT) Received: from localhost.localdomain ([46.53.248.83]) by smtp.gmail.com with ESMTPSA id h10sm15734356wrp.22.2021.03.14.09.25.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 09:25:03 -0700 (PDT) Date: Sun, 14 Mar 2021 19:25:01 +0300 From: Alexey Dobriyan To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] cred: make init_groups static Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nothing really uses init_groups. It can be accessed via init_cred if necessary. Signed-off-by: Alexey Dobriyan --- include/linux/cred.h | 1 - include/linux/init_task.h | 1 - kernel/cred.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -53,7 +53,6 @@ do { \ groups_free(group_info); \ } while (0) -extern struct group_info init_groups; #ifdef CONFIG_MULTIUSER extern struct group_info *groups_alloc(int); extern void groups_free(struct group_info *); --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -25,7 +25,6 @@ extern struct files_struct init_files; extern struct fs_struct init_fs; extern struct nsproxy init_nsproxy; -extern struct group_info init_groups; extern struct cred init_cred; #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE --- a/kernel/cred.c +++ b/kernel/cred.c @@ -33,7 +33,7 @@ do { \ static struct kmem_cache *cred_jar; /* init to 2 - one for init_task, one to ensure it is never freed */ -struct group_info init_groups = { .usage = ATOMIC_INIT(2) }; +static struct group_info init_groups = { .usage = ATOMIC_INIT(2) }; /* * The initial credentials for the initial task