diff options
| author | Arjan van de Ven <[email protected]> | 2007-02-12 08:55:34 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-02-12 17:48:45 +0000 |
| commit | 00977a59b951207d38380c75f03a36829950265c (patch) | |
| tree | 26933feafebffca95df02c19df03f5e56aada47e /fs/proc/root.c | |
| parent | [PATCH] mark struct file_operations const 5 (diff) | |
| download | kernel-00977a59b951207d38380c75f03a36829950265c.tar.gz kernel-00977a59b951207d38380c75f03a36829950265c.zip | |
[PATCH] mark struct file_operations const 6
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.
Signed-off-by: Arjan van de Ven <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/root.c')
| -rw-r--r-- | fs/proc/root.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c index 64d242b6dcfa..81c92e967a98 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -136,7 +136,7 @@ static int proc_root_readdir(struct file * filp, * <pid> directories. Thus we don't use the generic * directory handling functions for that.. */ -static struct file_operations proc_root_operations = { +static const struct file_operations proc_root_operations = { .read = generic_read_dir, .readdir = proc_root_readdir, }; |
