History

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.

Rasmus Villemoes committed 5 years ago

Commit 32c93971 parent 8ba9d403 files · +1 −3Browse files

Unified · Split

3 files
  1. include/linux/cred.h +0 −1
  2. include/linux/init_task.h +0 −1
  3. kernel/cred.c +1 −1
include/linux/cred.h+0−1
@@ -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
56extern struct group_info init_groups;
57#ifdef CONFIG_MULTIUSER56#ifdef CONFIG_MULTIUSER
58extern struct group_info *groups_alloc(int);57extern struct group_info *groups_alloc(int);
59extern void groups_free(struct group_info *);58extern void groups_free(struct group_info *);
include/linux/init_task.h+0−1
@@ -25,7 +25,6 @@ · 24 unmodified lines
25extern struct files_struct init_files;25extern struct files_struct init_files;
26extern struct fs_struct init_fs;26extern struct fs_struct init_fs;
27extern struct nsproxy init_nsproxy;27extern struct nsproxy init_nsproxy;
28extern struct group_info init_groups;
29extern struct cred init_cred;28extern struct cred init_cred;
30 29
31#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE30#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
kernel/cred.c+1−1
@@ -33,7 +33,7 @@ do { \ · 32 unmodified lines
33static struct kmem_cache *cred_jar;33static 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 */
36struct group_info init_groups = { .usage = ATOMIC_INIT(2) };36static struct group_info init_groups = { .usage = ATOMIC_INIT(2) };
37 37
38/*38/*
39 * The initial credentials for the initial task39 * The initial credentials for the initial task

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t