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.
Unified · Split
| @@ -53,7 +53,6 @@ do { \ · 52 unmodified lines | |||
| 53 | groups_free(group_info); \ | 53 | groups_free(group_info); \ |
| 54 | } while (0) | 54 | } while (0) |
| 55 | 55 | ||
| 56 | extern struct group_info init_groups; | ||
| 57 | #ifdef CONFIG_MULTIUSER | 56 | #ifdef CONFIG_MULTIUSER |
| 58 | extern struct group_info *groups_alloc(int); | 57 | extern struct group_info *groups_alloc(int); |
| 59 | extern void groups_free(struct group_info *); | 58 | extern void groups_free(struct group_info *); |
| @@ -25,7 +25,6 @@ · 24 unmodified lines | |||
| 25 | extern struct files_struct init_files; | 25 | extern struct files_struct init_files; |
| 26 | extern struct fs_struct init_fs; | 26 | extern struct fs_struct init_fs; |
| 27 | extern struct nsproxy init_nsproxy; | 27 | extern struct nsproxy init_nsproxy; |
| 28 | extern struct group_info init_groups; | ||
| 29 | extern struct cred init_cred; | 28 | extern struct cred init_cred; |
| 30 | 29 | ||
| 31 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE | 30 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE |
| @@ -33,7 +33,7 @@ do { \ · 32 unmodified lines | |||
| 33 | static struct kmem_cache *cred_jar; | 33 | static struct kmem_cache *cred_jar; |
| 34 | 34 | ||
| 35 | /* init to 2 - one for init_task, one to ensure it is never freed */ | 35 | /* init to 2 - one for init_task, one to ensure it is never freed */ |
| 36 | struct group_info init_groups = { .usage = ATOMIC_INIT(2) }; | 36 | static struct group_info init_groups = { .usage = ATOMIC_INIT(2) }; |
| 37 | 37 | ||
| 38 | /* | 38 | /* |
| 39 | * The initial credentials for the initial task | 39 | * The initial credentials for the initial task |