aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/util.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:35 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:46 -0500
commit9a32144e9d7b4e21341174b1a83b82a82353be86 (patch)
tree6f08560b341418fc9934f56f6162a95f5b5d8aec /ipc/util.c
parent00977a59b951207d38380c75f03a36829950265c (diff)
[PATCH] mark struct file_operations const 7
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 <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/util.c')
-rw-r--r--ipc/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/util.c b/ipc/util.c
index 115e9aac1366..08a647965b9e 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -205,7 +205,7 @@ void __ipc_init ipc_init_ids(struct ipc_ids* ids, int size)
205} 205}
206 206
207#ifdef CONFIG_PROC_FS 207#ifdef CONFIG_PROC_FS
208static struct file_operations sysvipc_proc_fops; 208static const struct file_operations sysvipc_proc_fops;
209/** 209/**
210 * ipc_init_proc_interface - Create a proc interface for sysipc types using a seq_file interface. 210 * ipc_init_proc_interface - Create a proc interface for sysipc types using a seq_file interface.
211 * @path: Path in procfs 211 * @path: Path in procfs
@@ -879,7 +879,7 @@ static int sysvipc_proc_release(struct inode *inode, struct file *file)
879 return seq_release_private(inode, file); 879 return seq_release_private(inode, file);
880} 880}
881 881
882static struct file_operations sysvipc_proc_fops = { 882static const struct file_operations sysvipc_proc_fops = {
883 .open = sysvipc_proc_open, 883 .open = sysvipc_proc_open,
884 .read = seq_read, 884 .read = seq_read,
885 .llseek = seq_lseek, 885 .llseek = seq_lseek,