Commit 32c93976 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Linus Torvalds

kernel/cred.c: make init_groups static

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.

Link: https://lkml.kernel.org/r/20210310220102.2484201-1-linux@rasmusvillemoes.dkSigned-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8ba9d40b
...@@ -53,7 +53,6 @@ do { \ ...@@ -53,7 +53,6 @@ do { \
groups_free(group_info); \ groups_free(group_info); \
} while (0) } while (0)
extern struct group_info init_groups;
#ifdef CONFIG_MULTIUSER #ifdef CONFIG_MULTIUSER
extern struct group_info *groups_alloc(int); extern struct group_info *groups_alloc(int);
extern void groups_free(struct group_info *); extern void groups_free(struct group_info *);
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
extern struct files_struct init_files; extern struct files_struct init_files;
extern struct fs_struct init_fs; extern struct fs_struct init_fs;
extern struct nsproxy init_nsproxy; extern struct nsproxy init_nsproxy;
extern struct group_info init_groups;
extern struct cred init_cred; extern struct cred init_cred;
#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
......
...@@ -33,7 +33,7 @@ do { \ ...@@ -33,7 +33,7 @@ do { \
static struct kmem_cache *cred_jar; static struct kmem_cache *cred_jar;
/* init to 2 - one for init_task, one to ensure it is never freed */ /* 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 * The initial credentials for the initial task
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment