Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp629510ybp; Wed, 9 Oct 2019 01:30:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyE9C0HLY4v0CmclEdkQHRa5XzmAb39ddoTOqIt244M1yrMQFlHirXHsGA7JizFVyJC34hv X-Received: by 2002:a17:907:2118:: with SMTP id qn24mr1612103ejb.141.1570609835429; Wed, 09 Oct 2019 01:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570609835; cv=none; d=google.com; s=arc-20160816; b=rhS3/PQIjZB/Po8Zo+Ehm+RZ/KY1FadSiiktQ7q/Z3s5bvGsdaArHISapDZMIKBt4D AY/tzG5k62e1vg+hW0fJpmWwQgROdHP8DUxrldr2ScIxi8hRT0kIGslLcRdkXIWLgNTW BYdC+Cv74qiHDDYbNxsBEC6N50I0L+5kWSx8vu+nYEmXm1F2HFD4/xfmboyIxgFkBdw7 lmn+G6b8GylmjWf+XZzXRTmoa9X4lXrgtVLFKFUY24s1G4CaADPqXaYluco34hm0XejF Jy8RqD9Sd9vLFiJQxgAsMyv+SgLtDr1dCmVmktArVdFkyGrtmX5U6gg72N5QMpfIAyR8 eXmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=9aF36gaw1IL/nWzuDiTqLh7zzkv/1MrK93P5SQw9amo=; b=IV5YKEcQ2FjT5VZ7ewHcF3RyQtYOiiq7oNSdTgiaxutb9NYVtE7t4ndpga126LcUD9 JwOkE+pAiKiTx+kZA5OvZO7B924J4jX0h1cVI7ZOboT+JTCffBrYn0Dh+68lLUnC/0kT 9UDKrNiS6mTQYECw4BuJTVbfYyCfAbJ98bD4yU6dyW1R+kKi/ftR7dNc7wGynrW5Vr2W O4tQpADP8WGlhnBhkiE4TMGk2LiZXarEWk2AxPVNnusUeYdplEyL/lRmaKujWtWUs5Hv ngp74gTXC0qkMtcnZ0LJrLMagp70oLLgX3InqEaPuF7V+gknuTwcbKxMB6dPa2ATJKnz QiMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=GCxTBJV2; 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 d32si962210eda.266.2019.10.09.01.30.12; Wed, 09 Oct 2019 01:30:35 -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; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=GCxTBJV2; 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 S1729768AbfJIIaA (ORCPT + 99 others); Wed, 9 Oct 2019 04:30:00 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:33807 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbfJIIaA (ORCPT ); Wed, 9 Oct 2019 04:30:00 -0400 Received: by mail-lf1-f65.google.com with SMTP id r22so990557lfm.1 for ; Wed, 09 Oct 2019 01:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9aF36gaw1IL/nWzuDiTqLh7zzkv/1MrK93P5SQw9amo=; b=GCxTBJV2TpfN5yh9793aMppv3nFyV0gP/CEpN0FhqOU0FI3HvIFnrG7SFVPFndQfQ/ en0lxtP89WPAMPk9DT2k4QLmsY/06k1uBFGbZdUotZ1kLMHjlj1cckoaflNScKeGwaSP zH8Mh9H5zvvq0fR8ajjoqoQ65WsgxjdxOhaqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9aF36gaw1IL/nWzuDiTqLh7zzkv/1MrK93P5SQw9amo=; b=LYJjcPmklZFkAuihOWZqD6V261hO8oRac4qSFh/oho7zEOC398rnBnPq8hyeP5aWcr Jd+T5QWg7Ex5jfrVzlxySG22sLBlVdySncOGd+bT/EpMAnw5R/Va7BqsuIig0l4A/HXi PbSYodg4M7x/6G9FN1oUSaNoxw7gF93Npux4L05SRi0RV9JM2MFEs7rGFbdZRmXg9MIi KFv6KX2QEmzPAo7gSZ7db+G14nxDX86RJvKrk5p0ja+Ik8hIe8Ta1hpiOyTg/7Ihsadh zXv9RC5/FKJlYYa1q6LaL5GK23NDK8fZ2jdMDcyiS1ojOXDiC+O0alfyEuzfgWaz9YMo BHEA== X-Gm-Message-State: APjAAAU5wTBS61WI/q4cktW+HZMrMpHoEt4wrw6Pc0aKbuGtR7TbZuDe 0SneVSaiibjxLhKAfToLPSd7qw== X-Received: by 2002:ac2:4345:: with SMTP id o5mr1342574lfl.60.1570609796736; Wed, 09 Oct 2019 01:29:56 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id p86sm273799lja.100.2019.10.09.01.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 01:29:56 -0700 (PDT) From: Rasmus Villemoes To: James Morris , Paul Moore , Rasmus Villemoes , Thomas Gleixner , Frederic Weisbecker Cc: linux-kernel@vger.kernel.org Subject: [PATCH] kernel/cred.c: make init_groups static Date: Wed, 9 Oct 2019 10:29:52 +0200 Message-Id: <20191009082953.8864-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org init_groups is declared in both cred.h and init_task.h, but it is not actually referenced anywhere outside of cred.c where it is defined. So make it static and remove the declarations. Signed-off-by: Rasmus Villemoes --- include/linux/cred.h | 1 - include/linux/init_task.h | 1 - kernel/cred.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/cred.h b/include/linux/cred.h index 18639c069263..4f4af62fe8f9 100644 --- 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 *); diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 2c620d7ac432..6a046030ffad 100644 --- 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 diff --git a/kernel/cred.c b/kernel/cred.c index c0a4c12d38b2..87983c9f82e9 100644 --- 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 -- 2.20.1