aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:34 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commit00977a59b951207d38380c75f03a36829950265c (patch)
tree26933feafebffca95df02c19df03f5e56aada47e
parentd54b1fdb1d9f82e375a299e22bd366aad52d4c34 (diff)
[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 <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/sbus/char/bpp.c2
-rw-r--r--drivers/sbus/char/cpwatchdog.c2
-rw-r--r--drivers/sbus/char/display7seg.c2
-rw-r--r--drivers/sbus/char/envctrl.c2
-rw-r--r--drivers/sbus/char/flash.c2
-rw-r--r--drivers/sbus/char/jsflash.c2
-rw-r--r--drivers/sbus/char/openprom.c2
-rw-r--r--drivers/sbus/char/riowatchdog.c2
-rw-r--r--drivers/sbus/char/rtc.c2
-rw-r--r--drivers/sbus/char/uctrl.c2
-rw-r--r--drivers/sbus/char/vfc_dev.c4
-rw-r--r--drivers/scsi/3w-9xxx.c2
-rw-r--r--drivers/scsi/3w-xxxx.c2
-rw-r--r--drivers/scsi/aacraid/linit.c2
-rw-r--r--drivers/scsi/ch.c2
-rw-r--r--drivers/scsi/dpt_i2o.c2
-rw-r--r--drivers/scsi/gdth.c2
-rw-r--r--drivers/scsi/megaraid.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c2
-rw-r--r--drivers/scsi/osst.c2
-rw-r--r--drivers/scsi/scsi_proc.c2
-rw-r--r--drivers/scsi/scsi_tgt_if.c2
-rw-r--r--drivers/scsi/st.c2
-rw-r--r--drivers/telephony/ixj.c2
-rw-r--r--drivers/telephony/phonedev.c2
-rw-r--r--drivers/usb/misc/adutux.c2
-rw-r--r--drivers/usb/misc/ftdi-elan.c2
-rw-r--r--drivers/video/mbx/mbxdebugfs.c12
-rw-r--r--drivers/zorro/proc.c2
-rw-r--r--fs/debugfs/file.c2
-rw-r--r--fs/dlm/debug_fs.c4
-rw-r--r--fs/dlm/user.c6
-rw-r--r--fs/gfs2/locking/dlm/plock.c2
-rw-r--r--fs/nfs/client.c4
-rw-r--r--fs/ocfs2/dlm/dlmfs.c4
-rw-r--r--fs/proc/base.c32
-rw-r--r--fs/proc/generic.c4
-rw-r--r--fs/proc/internal.h12
-rw-r--r--fs/proc/nommu.c2
-rw-r--r--fs/proc/proc_misc.c26
-rw-r--r--fs/proc/proc_tty.c2
-rw-r--r--fs/proc/root.c2
-rw-r--r--fs/proc/task_mmu.c6
-rw-r--r--fs/proc/task_nommu.c2
45 files changed, 91 insertions, 91 deletions
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c
index ac7d1258efee..a39ee80c9715 100644
--- a/drivers/sbus/char/bpp.c
+++ b/drivers/sbus/char/bpp.c
@@ -846,7 +846,7 @@ static int bpp_ioctl(struct inode *inode, struct file *f, unsigned int cmd,
846 return errno; 846 return errno;
847} 847}
848 848
849static struct file_operations bpp_fops = { 849static const struct file_operations bpp_fops = {
850 .owner = THIS_MODULE, 850 .owner = THIS_MODULE,
851 .read = bpp_read, 851 .read = bpp_read,
852 .write = bpp_write, 852 .write = bpp_write,
diff --git a/drivers/sbus/char/cpwatchdog.c b/drivers/sbus/char/cpwatchdog.c
index ad1c7db96cb4..0cfd1e4c032c 100644
--- a/drivers/sbus/char/cpwatchdog.c
+++ b/drivers/sbus/char/cpwatchdog.c
@@ -459,7 +459,7 @@ static irqreturn_t wd_interrupt(int irq, void *dev_id)
459 return IRQ_HANDLED; 459 return IRQ_HANDLED;
460} 460}
461 461
462static struct file_operations wd_fops = { 462static const struct file_operations wd_fops = {
463 .owner = THIS_MODULE, 463 .owner = THIS_MODULE,
464 .ioctl = wd_ioctl, 464 .ioctl = wd_ioctl,
465 .compat_ioctl = wd_compat_ioctl, 465 .compat_ioctl = wd_compat_ioctl,
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index a4909e0c7f83..2d14a29effe4 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -166,7 +166,7 @@ static long d7s_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
166 return error; 166 return error;
167} 167}
168 168
169static struct file_operations d7s_fops = { 169static const struct file_operations d7s_fops = {
170 .owner = THIS_MODULE, 170 .owner = THIS_MODULE,
171 .unlocked_ioctl = d7s_ioctl, 171 .unlocked_ioctl = d7s_ioctl,
172 .compat_ioctl = d7s_ioctl, 172 .compat_ioctl = d7s_ioctl,
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index fff4660cdf96..2cea4f5d2084 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -705,7 +705,7 @@ envctrl_release(struct inode *inode, struct file *file)
705 return 0; 705 return 0;
706} 706}
707 707
708static struct file_operations envctrl_fops = { 708static const struct file_operations envctrl_fops = {
709 .owner = THIS_MODULE, 709 .owner = THIS_MODULE,
710 .read = envctrl_read, 710 .read = envctrl_read,
711 .unlocked_ioctl = envctrl_ioctl, 711 .unlocked_ioctl = envctrl_ioctl,
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index fa2418f7ad39..6e99507aeb12 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -142,7 +142,7 @@ flash_release(struct inode *inode, struct file *file)
142 return 0; 142 return 0;
143} 143}
144 144
145static struct file_operations flash_fops = { 145static const struct file_operations flash_fops = {
146 /* no write to the Flash, use mmap 146 /* no write to the Flash, use mmap
147 * and play flash dependent tricks. 147 * and play flash dependent tricks.
148 */ 148 */
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c
index 14631ac11bc7..512857a23169 100644
--- a/drivers/sbus/char/jsflash.c
+++ b/drivers/sbus/char/jsflash.c
@@ -431,7 +431,7 @@ static int jsf_release(struct inode *inode, struct file *file)
431 return 0; 431 return 0;
432} 432}
433 433
434static struct file_operations jsf_fops = { 434static const struct file_operations jsf_fops = {
435 .owner = THIS_MODULE, 435 .owner = THIS_MODULE,
436 .llseek = jsf_lseek, 436 .llseek = jsf_lseek,
437 .read = jsf_read, 437 .read = jsf_read,
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index 4e2a0e2dcc2e..e8776230782b 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -704,7 +704,7 @@ static int openprom_release(struct inode * inode, struct file * file)
704 return 0; 704 return 0;
705} 705}
706 706
707static struct file_operations openprom_fops = { 707static const struct file_operations openprom_fops = {
708 .owner = THIS_MODULE, 708 .owner = THIS_MODULE,
709 .llseek = no_llseek, 709 .llseek = no_llseek,
710 .ioctl = openprom_ioctl, 710 .ioctl = openprom_ioctl,
diff --git a/drivers/sbus/char/riowatchdog.c b/drivers/sbus/char/riowatchdog.c
index 2a9cc8204429..a2fc6b8c1334 100644
--- a/drivers/sbus/char/riowatchdog.c
+++ b/drivers/sbus/char/riowatchdog.c
@@ -193,7 +193,7 @@ static ssize_t riowd_write(struct file *file, const char __user *buf, size_t cou
193 return 0; 193 return 0;
194} 194}
195 195
196static struct file_operations riowd_fops = { 196static const struct file_operations riowd_fops = {
197 .owner = THIS_MODULE, 197 .owner = THIS_MODULE,
198 .ioctl = riowd_ioctl, 198 .ioctl = riowd_ioctl,
199 .open = riowd_open, 199 .open = riowd_open,
diff --git a/drivers/sbus/char/rtc.c b/drivers/sbus/char/rtc.c
index 9b988baf0b51..94d185829119 100644
--- a/drivers/sbus/char/rtc.c
+++ b/drivers/sbus/char/rtc.c
@@ -233,7 +233,7 @@ static int rtc_release(struct inode *inode, struct file *file)
233 return 0; 233 return 0;
234} 234}
235 235
236static struct file_operations rtc_fops = { 236static const struct file_operations rtc_fops = {
237 .owner = THIS_MODULE, 237 .owner = THIS_MODULE,
238 .llseek = no_llseek, 238 .llseek = no_llseek,
239 .ioctl = rtc_ioctl, 239 .ioctl = rtc_ioctl,
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index b30372f17f1c..4d1a505e9e74 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -224,7 +224,7 @@ static irqreturn_t uctrl_interrupt(int irq, void *dev_id)
224 return IRQ_HANDLED; 224 return IRQ_HANDLED;
225} 225}
226 226
227static struct file_operations uctrl_fops = { 227static const struct file_operations uctrl_fops = {
228 .owner = THIS_MODULE, 228 .owner = THIS_MODULE,
229 .llseek = no_llseek, 229 .llseek = no_llseek,
230 .ioctl = uctrl_ioctl, 230 .ioctl = uctrl_ioctl,
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c
index 386e7de0b7e3..37a04a0cecfa 100644
--- a/drivers/sbus/char/vfc_dev.c
+++ b/drivers/sbus/char/vfc_dev.c
@@ -44,7 +44,7 @@
44#include "vfc.h" 44#include "vfc.h"
45#include <asm/vfc_ioctls.h> 45#include <asm/vfc_ioctls.h>
46 46
47static struct file_operations vfc_fops; 47static const struct file_operations vfc_fops;
48struct vfc_dev **vfc_dev_lst; 48struct vfc_dev **vfc_dev_lst;
49static char vfcstr[]="vfc"; 49static char vfcstr[]="vfc";
50static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { 50static unsigned char saa9051_init_array[VFC_SAA9051_NR] = {
@@ -633,7 +633,7 @@ static int vfc_mmap(struct file *file, struct vm_area_struct *vma)
633} 633}
634 634
635 635
636static struct file_operations vfc_fops = { 636static const struct file_operations vfc_fops = {
637 .owner = THIS_MODULE, 637 .owner = THIS_MODULE,
638 .llseek = no_llseek, 638 .llseek = no_llseek,
639 .ioctl = vfc_ioctl, 639 .ioctl = vfc_ioctl,
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index b091a0fc4eb0..eb766c3af1c8 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -197,7 +197,7 @@ static struct class_device_attribute *twa_host_attrs[] = {
197}; 197};
198 198
199/* File operations struct for character device */ 199/* File operations struct for character device */
200static struct file_operations twa_fops = { 200static const struct file_operations twa_fops = {
201 .owner = THIS_MODULE, 201 .owner = THIS_MODULE,
202 .ioctl = twa_chrdev_ioctl, 202 .ioctl = twa_chrdev_ioctl,
203 .open = twa_chrdev_open, 203 .open = twa_chrdev_open,
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index e1b44d6c0c32..bf5d63e1beee 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -1040,7 +1040,7 @@ static int tw_chrdev_open(struct inode *inode, struct file *file)
1040} /* End tw_chrdev_open() */ 1040} /* End tw_chrdev_open() */
1041 1041
1042/* File operations struct for character device */ 1042/* File operations struct for character device */
1043static struct file_operations tw_fops = { 1043static const struct file_operations tw_fops = {
1044 .owner = THIS_MODULE, 1044 .owner = THIS_MODULE,
1045 .ioctl = tw_chrdev_ioctl, 1045 .ioctl = tw_chrdev_ioctl,
1046 .open = tw_chrdev_open, 1046 .open = tw_chrdev_open,
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index a9734e08fe28..0f948c2fb609 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -774,7 +774,7 @@ static struct class_device_attribute *aac_attrs[] = {
774}; 774};
775 775
776 776
777static struct file_operations aac_cfg_fops = { 777static const struct file_operations aac_cfg_fops = {
778 .owner = THIS_MODULE, 778 .owner = THIS_MODULE,
779 .ioctl = aac_cfg_ioctl, 779 .ioctl = aac_cfg_ioctl,
780#ifdef CONFIG_COMPAT 780#ifdef CONFIG_COMPAT
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index f6caa4307768..d02759f13469 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -129,7 +129,7 @@ static struct scsi_driver ch_template =
129 }, 129 },
130}; 130};
131 131
132static struct file_operations changer_fops = 132static const struct file_operations changer_fops =
133{ 133{
134 .owner = THIS_MODULE, 134 .owner = THIS_MODULE,
135 .open = ch_open, 135 .open = ch_open,
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 365db537a28d..cd36e81b2d93 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -116,7 +116,7 @@ static int sys_tbl_len = 0;
116static adpt_hba* hba_chain = NULL; 116static adpt_hba* hba_chain = NULL;
117static int hba_count = 0; 117static int hba_count = 0;
118 118
119static struct file_operations adpt_fops = { 119static const struct file_operations adpt_fops = {
120 .ioctl = adpt_ioctl, 120 .ioctl = adpt_ioctl,
121 .open = adpt_open, 121 .open = adpt_open,
122 .release = adpt_close 122 .release = adpt_close
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 4c698a71f66f..a1992928e671 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -687,7 +687,7 @@ MODULE_AUTHOR("Achim Leubner");
687MODULE_LICENSE("GPL"); 687MODULE_LICENSE("GPL");
688 688
689/* ioctl interface */ 689/* ioctl interface */
690static struct file_operations gdth_fops = { 690static const struct file_operations gdth_fops = {
691 .ioctl = gdth_ioctl, 691 .ioctl = gdth_ioctl,
692 .open = gdth_open, 692 .open = gdth_open,
693 .release = gdth_close, 693 .release = gdth_close,
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 77d9d3804ccf..808a1b8c4043 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -92,7 +92,7 @@ static struct mega_hbas mega_hbas[MAX_CONTROLLERS];
92/* 92/*
93 * The File Operations structure for the serial/ioctl interface of the driver 93 * The File Operations structure for the serial/ioctl interface of the driver
94 */ 94 */
95static struct file_operations megadev_fops = { 95static const struct file_operations megadev_fops = {
96 .owner = THIS_MODULE, 96 .owner = THIS_MODULE,
97 .ioctl = megadev_ioctl, 97 .ioctl = megadev_ioctl,
98 .open = megadev_open, 98 .open = megadev_open,
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index c1ff20c4747d..f33a678f0897 100644
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -67,7 +67,7 @@ static struct list_head adapters_list_g;
67 67
68static wait_queue_head_t wait_q; 68static wait_queue_head_t wait_q;
69 69
70static struct file_operations lsi_fops = { 70static const struct file_operations lsi_fops = {
71 .open = mraid_mm_open, 71 .open = mraid_mm_open,
72 .ioctl = mraid_mm_ioctl, 72 .ioctl = mraid_mm_ioctl,
73#ifdef CONFIG_COMPAT 73#ifdef CONFIG_COMPAT
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index b5bdd0d7a8bf..15e24fcc84f3 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -2913,7 +2913,7 @@ megasas_mgmt_compat_ioctl(struct file *file, unsigned int cmd,
2913/* 2913/*
2914 * File operations structure for management interface 2914 * File operations structure for management interface
2915 */ 2915 */
2916static struct file_operations megasas_mgmt_fops = { 2916static const struct file_operations megasas_mgmt_fops = {
2917 .owner = THIS_MODULE, 2917 .owner = THIS_MODULE,
2918 .open = megasas_mgmt_open, 2918 .open = megasas_mgmt_open,
2919 .release = megasas_mgmt_release, 2919 .release = megasas_mgmt_release,
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index bd6bbf61adb8..9668b73872c7 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -5522,7 +5522,7 @@ __setup("osst=", osst_setup);
5522 5522
5523#endif 5523#endif
5524 5524
5525static struct file_operations osst_fops = { 5525static const struct file_operations osst_fops = {
5526 .owner = THIS_MODULE, 5526 .owner = THIS_MODULE,
5527 .read = osst_read, 5527 .read = osst_read,
5528 .write = osst_write, 5528 .write = osst_write,
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
index 524a5f7a5193..69d6e9b198c4 100644
--- a/drivers/scsi/scsi_proc.c
+++ b/drivers/scsi/scsi_proc.c
@@ -308,7 +308,7 @@ static int proc_scsi_open(struct inode *inode, struct file *file)
308 return single_open(file, proc_scsi_show, NULL); 308 return single_open(file, proc_scsi_show, NULL);
309} 309}
310 310
311static struct file_operations proc_scsi_operations = { 311static const struct file_operations proc_scsi_operations = {
312 .open = proc_scsi_open, 312 .open = proc_scsi_open,
313 .read = seq_read, 313 .read = seq_read,
314 .write = proc_scsi_write, 314 .write = proc_scsi_write,
diff --git a/drivers/scsi/scsi_tgt_if.c b/drivers/scsi/scsi_tgt_if.c
index 37bbfbdb870f..f2344ab8deff 100644
--- a/drivers/scsi/scsi_tgt_if.c
+++ b/drivers/scsi/scsi_tgt_if.c
@@ -280,7 +280,7 @@ static int tgt_open(struct inode *inode, struct file *file)
280 return 0; 280 return 0;
281} 281}
282 282
283static struct file_operations tgt_fops = { 283static const struct file_operations tgt_fops = {
284 .owner = THIS_MODULE, 284 .owner = THIS_MODULE,
285 .open = tgt_open, 285 .open = tgt_open,
286 .poll = tgt_poll, 286 .poll = tgt_poll,
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 16e279be4a3e..3d2e02381e92 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -3864,7 +3864,7 @@ __setup("st=", st_setup);
3864 3864
3865#endif 3865#endif
3866 3866
3867static struct file_operations st_fops = 3867static const struct file_operations st_fops =
3868{ 3868{
3869 .owner = THIS_MODULE, 3869 .owner = THIS_MODULE,
3870 .read = st_read, 3870 .read = st_read,
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
index 58deaac5b373..71cb64e41a1b 100644
--- a/drivers/telephony/ixj.c
+++ b/drivers/telephony/ixj.c
@@ -6663,7 +6663,7 @@ static int ixj_fasync(int fd, struct file *file_p, int mode)
6663 return fasync_helper(fd, file_p, mode, &j->async_queue); 6663 return fasync_helper(fd, file_p, mode, &j->async_queue);
6664} 6664}
6665 6665
6666static struct file_operations ixj_fops = 6666static const struct file_operations ixj_fops =
6667{ 6667{
6668 .owner = THIS_MODULE, 6668 .owner = THIS_MODULE,
6669 .read = ixj_enhanced_read, 6669 .read = ixj_enhanced_read,
diff --git a/drivers/telephony/phonedev.c b/drivers/telephony/phonedev.c
index e41f49afd0f4..4d8c2a5b3297 100644
--- a/drivers/telephony/phonedev.c
+++ b/drivers/telephony/phonedev.c
@@ -127,7 +127,7 @@ void phone_unregister_device(struct phone_device *pfd)
127} 127}
128 128
129 129
130static struct file_operations phone_fops = 130static const struct file_operations phone_fops =
131{ 131{
132 .owner = THIS_MODULE, 132 .owner = THIS_MODULE,
133 .open = phone_open, 133 .open = phone_open,
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index af2934e016a7..75bfab95ab3c 100644
--- a/drivers/usb/misc/adutux.c
+++ b/drivers/usb/misc/adutux.c
@@ -644,7 +644,7 @@ exit:
644} 644}
645 645
646/* file operations needed when we register this driver */ 646/* file operations needed when we register this driver */
647static struct file_operations adu_fops = { 647static const struct file_operations adu_fops = {
648 .owner = THIS_MODULE, 648 .owner = THIS_MODULE,
649 .read = adu_read, 649 .read = adu_read,
650 .write = adu_write, 650 .write = adu_write,
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c
index 41c0161abdb9..0c1d66ddb812 100644
--- a/drivers/usb/misc/ftdi-elan.c
+++ b/drivers/usb/misc/ftdi-elan.c
@@ -1209,7 +1209,7 @@ error_1:
1209 return retval; 1209 return retval;
1210} 1210}
1211 1211
1212static struct file_operations ftdi_elan_fops = { 1212static const struct file_operations ftdi_elan_fops = {
1213 .owner = THIS_MODULE, 1213 .owner = THIS_MODULE,
1214 .llseek = no_llseek, 1214 .llseek = no_llseek,
1215 .ioctl = ftdi_elan_ioctl, 1215 .ioctl = ftdi_elan_ioctl,
diff --git a/drivers/video/mbx/mbxdebugfs.c b/drivers/video/mbx/mbxdebugfs.c
index 472a3ca3d92d..15b8b3c4330e 100644
--- a/drivers/video/mbx/mbxdebugfs.c
+++ b/drivers/video/mbx/mbxdebugfs.c
@@ -170,37 +170,37 @@ static ssize_t misc_read_file(struct file *file, char __user *userbuf,
170} 170}
171 171
172 172
173static struct file_operations sysconf_fops = { 173static const struct file_operations sysconf_fops = {
174 .read = sysconf_read_file, 174 .read = sysconf_read_file,
175 .write = write_file_dummy, 175 .write = write_file_dummy,
176 .open = open_file_generic, 176 .open = open_file_generic,
177}; 177};
178 178
179static struct file_operations clock_fops = { 179static const struct file_operations clock_fops = {
180 .read = clock_read_file, 180 .read = clock_read_file,
181 .write = write_file_dummy, 181 .write = write_file_dummy,
182 .open = open_file_generic, 182 .open = open_file_generic,
183}; 183};
184 184
185static struct file_operations display_fops = { 185static const struct file_operations display_fops = {
186 .read = display_read_file, 186 .read = display_read_file,
187 .write = write_file_dummy, 187 .write = write_file_dummy,
188 .open = open_file_generic, 188 .open = open_file_generic,
189}; 189};
190 190
191static struct file_operations gsctl_fops = { 191static const struct file_operations gsctl_fops = {
192 .read = gsctl_read_file, 192 .read = gsctl_read_file,
193 .write = write_file_dummy, 193 .write = write_file_dummy,
194 .open = open_file_generic, 194 .open = open_file_generic,
195}; 195};
196 196
197static struct file_operations sdram_fops = { 197static const struct file_operations sdram_fops = {
198 .read = sdram_read_file, 198 .read = sdram_read_file,
199 .write = write_file_dummy, 199 .write = write_file_dummy,
200 .open = open_file_generic, 200 .open = open_file_generic,
201}; 201};
202 202
203static struct file_operations misc_fops = { 203static const struct file_operations misc_fops = {
204 .read = misc_read_file, 204 .read = misc_read_file,
205 .write = write_file_dummy, 205 .write = write_file_dummy,
206 .open = open_file_generic, 206 .open = open_file_generic,
diff --git a/drivers/zorro/proc.c b/drivers/zorro/proc.c
index 60b05bc15642..b3ce8859a586 100644
--- a/drivers/zorro/proc.c
+++ b/drivers/zorro/proc.c
@@ -75,7 +75,7 @@ proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *
75 return nbytes; 75 return nbytes;
76} 76}
77 77
78static struct file_operations proc_bus_zorro_operations = { 78static const struct file_operations proc_bus_zorro_operations = {
79 .llseek = proc_bus_zorro_lseek, 79 .llseek = proc_bus_zorro_lseek,
80 .read = proc_bus_zorro_read, 80 .read = proc_bus_zorro_read,
81}; 81};
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index bf3901ab1744..8d130cc85322 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -254,7 +254,7 @@ static ssize_t read_file_blob(struct file *file, char __user *user_buf,
254 blob->size); 254 blob->size);
255} 255}
256 256
257static struct file_operations fops_blob = { 257static const struct file_operations fops_blob = {
258 .read = read_file_blob, 258 .read = read_file_blob,
259 .open = default_open, 259 .open = default_open,
260}; 260};
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c
index ca94a837a5bb..61ba670b9e02 100644
--- a/fs/dlm/debug_fs.c
+++ b/fs/dlm/debug_fs.c
@@ -287,7 +287,7 @@ static int rsb_open(struct inode *inode, struct file *file)
287 return 0; 287 return 0;
288} 288}
289 289
290static struct file_operations rsb_fops = { 290static const struct file_operations rsb_fops = {
291 .owner = THIS_MODULE, 291 .owner = THIS_MODULE,
292 .open = rsb_open, 292 .open = rsb_open,
293 .read = seq_read, 293 .read = seq_read,
@@ -331,7 +331,7 @@ static ssize_t waiters_read(struct file *file, char __user *userbuf,
331 return rv; 331 return rv;
332} 332}
333 333
334static struct file_operations waiters_fops = { 334static const struct file_operations waiters_fops = {
335 .owner = THIS_MODULE, 335 .owner = THIS_MODULE,
336 .open = waiters_open, 336 .open = waiters_open,
337 .read = waiters_read 337 .read = waiters_read
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index d378b7fe2a1e..40db61dc95f2 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -25,7 +25,7 @@
25 25
26static const char *name_prefix="dlm"; 26static const char *name_prefix="dlm";
27static struct miscdevice ctl_device; 27static struct miscdevice ctl_device;
28static struct file_operations device_fops; 28static const struct file_operations device_fops;
29 29
30#ifdef CONFIG_COMPAT 30#ifdef CONFIG_COMPAT
31 31
@@ -759,7 +759,7 @@ static int ctl_device_close(struct inode *inode, struct file *file)
759 return 0; 759 return 0;
760} 760}
761 761
762static struct file_operations device_fops = { 762static const struct file_operations device_fops = {
763 .open = device_open, 763 .open = device_open,
764 .release = device_close, 764 .release = device_close,
765 .read = device_read, 765 .read = device_read,
@@ -768,7 +768,7 @@ static struct file_operations device_fops = {
768 .owner = THIS_MODULE, 768 .owner = THIS_MODULE,
769}; 769};
770 770
771static struct file_operations ctl_device_fops = { 771static const struct file_operations ctl_device_fops = {
772 .open = ctl_device_open, 772 .open = ctl_device_open,
773 .release = ctl_device_close, 773 .release = ctl_device_close,
774 .write = device_write, 774 .write = device_write,
diff --git a/fs/gfs2/locking/dlm/plock.c b/fs/gfs2/locking/dlm/plock.c
index 3799f19b282f..1dd4215b83d0 100644
--- a/fs/gfs2/locking/dlm/plock.c
+++ b/fs/gfs2/locking/dlm/plock.c
@@ -264,7 +264,7 @@ static unsigned int dev_poll(struct file *file, poll_table *wait)
264 return 0; 264 return 0;
265} 265}
266 266
267static struct file_operations dev_fops = { 267static const struct file_operations dev_fops = {
268 .read = dev_read, 268 .read = dev_read,
269 .write = dev_write, 269 .write = dev_write,
270 .poll = dev_poll, 270 .poll = dev_poll,
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 23ab145daa2d..ae9f36e393cf 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1173,7 +1173,7 @@ static struct seq_operations nfs_server_list_ops = {
1173 .show = nfs_server_list_show, 1173 .show = nfs_server_list_show,
1174}; 1174};
1175 1175
1176static struct file_operations nfs_server_list_fops = { 1176static const struct file_operations nfs_server_list_fops = {
1177 .open = nfs_server_list_open, 1177 .open = nfs_server_list_open,
1178 .read = seq_read, 1178 .read = seq_read,
1179 .llseek = seq_lseek, 1179 .llseek = seq_lseek,
@@ -1193,7 +1193,7 @@ static struct seq_operations nfs_volume_list_ops = {
1193 .show = nfs_volume_list_show, 1193 .show = nfs_volume_list_show,
1194}; 1194};
1195 1195
1196static struct file_operations nfs_volume_list_fops = { 1196static const struct file_operations nfs_volume_list_fops = {
1197 .open = nfs_volume_list_open, 1197 .open = nfs_volume_list_open,
1198 .read = seq_read, 1198 .read = seq_read,
1199 .llseek = seq_lseek, 1199 .llseek = seq_lseek,
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
index b7f0ba97a1a2..30826242bf51 100644
--- a/fs/ocfs2/dlm/dlmfs.c
+++ b/fs/ocfs2/dlm/dlmfs.c
@@ -62,7 +62,7 @@
62#include "cluster/masklog.h" 62#include "cluster/masklog.h"
63 63
64static struct super_operations dlmfs_ops; 64static struct super_operations dlmfs_ops;
65static struct file_operations dlmfs_file_operations; 65static const struct file_operations dlmfs_file_operations;
66static struct inode_operations dlmfs_dir_inode_operations; 66static struct inode_operations dlmfs_dir_inode_operations;
67static struct inode_operations dlmfs_root_inode_operations; 67static struct inode_operations dlmfs_root_inode_operations;
68static struct inode_operations dlmfs_file_inode_operations; 68static struct inode_operations dlmfs_file_inode_operations;
@@ -540,7 +540,7 @@ static int dlmfs_fill_super(struct super_block * sb,
540 return 0; 540 return 0;
541} 541}
542 542
543static struct file_operations dlmfs_file_operations = { 543static const struct file_operations dlmfs_file_operations = {
544 .open = dlmfs_file_open, 544 .open = dlmfs_file_open,
545 .release = dlmfs_file_release, 545 .release = dlmfs_file_release,
546 .read = dlmfs_file_read, 546 .read = dlmfs_file_read,
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 7fb37d6f2864..7b1ded63fa63 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -94,7 +94,7 @@ struct pid_entry {
94 char *name; 94 char *name;
95 mode_t mode; 95 mode_t mode;
96 struct inode_operations *iop; 96 struct inode_operations *iop;
97 struct file_operations *fop; 97 const struct file_operations *fop;
98 union proc_op op; 98 union proc_op op;
99}; 99};
100 100
@@ -424,7 +424,7 @@ static unsigned mounts_poll(struct file *file, poll_table *wait)
424 return res; 424 return res;
425} 425}
426 426
427static struct file_operations proc_mounts_operations = { 427static const struct file_operations proc_mounts_operations = {
428 .open = mounts_open, 428 .open = mounts_open,
429 .read = seq_read, 429 .read = seq_read,
430 .llseek = seq_lseek, 430 .llseek = seq_lseek,
@@ -462,7 +462,7 @@ static int mountstats_open(struct inode *inode, struct file *file)
462 return ret; 462 return ret;
463} 463}
464 464
465static struct file_operations proc_mountstats_operations = { 465static const struct file_operations proc_mountstats_operations = {
466 .open = mountstats_open, 466 .open = mountstats_open,
467 .read = seq_read, 467 .read = seq_read,
468 .llseek = seq_lseek, 468 .llseek = seq_lseek,
@@ -501,7 +501,7 @@ out_no_task:
501 return length; 501 return length;
502} 502}
503 503
504static struct file_operations proc_info_file_operations = { 504static const struct file_operations proc_info_file_operations = {
505 .read = proc_info_read, 505 .read = proc_info_read,
506}; 506};
507 507
@@ -646,7 +646,7 @@ static loff_t mem_lseek(struct file * file, loff_t offset, int orig)
646 return file->f_pos; 646 return file->f_pos;
647} 647}
648 648
649static struct file_operations proc_mem_operations = { 649static const struct file_operations proc_mem_operations = {
650 .llseek = mem_lseek, 650 .llseek = mem_lseek,
651 .read = mem_read, 651 .read = mem_read,
652 .write = mem_write, 652 .write = mem_write,
@@ -710,7 +710,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
710 return end - buffer; 710 return end - buffer;
711} 711}
712 712
713static struct file_operations proc_oom_adjust_operations = { 713static const struct file_operations proc_oom_adjust_operations = {
714 .read = oom_adjust_read, 714 .read = oom_adjust_read,
715 .write = oom_adjust_write, 715 .write = oom_adjust_write,
716}; 716};
@@ -777,7 +777,7 @@ out_free_page:
777 return length; 777 return length;
778} 778}
779 779
780static struct file_operations proc_loginuid_operations = { 780static const struct file_operations proc_loginuid_operations = {
781 .read = proc_loginuid_read, 781 .read = proc_loginuid_read,
782 .write = proc_loginuid_write, 782 .write = proc_loginuid_write,
783}; 783};
@@ -849,7 +849,7 @@ out_no_task:
849 return result; 849 return result;
850} 850}
851 851
852static struct file_operations proc_seccomp_operations = { 852static const struct file_operations proc_seccomp_operations = {
853 .read = seccomp_read, 853 .read = seccomp_read,
854 .write = seccomp_write, 854 .write = seccomp_write,
855}; 855};
@@ -908,7 +908,7 @@ static ssize_t proc_fault_inject_write(struct file * file,
908 return end - buffer; 908 return end - buffer;
909} 909}
910 910
911static struct file_operations proc_fault_inject_operations = { 911static const struct file_operations proc_fault_inject_operations = {
912 .read = proc_fault_inject_read, 912 .read = proc_fault_inject_read,
913 .write = proc_fault_inject_write, 913 .write = proc_fault_inject_write,
914}; 914};
@@ -1408,7 +1408,7 @@ out_no_task:
1408 return retval; 1408 return retval;
1409} 1409}
1410 1410
1411static struct file_operations proc_fd_operations = { 1411static const struct file_operations proc_fd_operations = {
1412 .read = generic_read_dir, 1412 .read = generic_read_dir,
1413 .readdir = proc_readfd, 1413 .readdir = proc_readfd,
1414}; 1414};
@@ -1623,7 +1623,7 @@ out_no_task:
1623 return length; 1623 return length;
1624} 1624}
1625 1625
1626static struct file_operations proc_pid_attr_operations = { 1626static const struct file_operations proc_pid_attr_operations = {
1627 .read = proc_pid_attr_read, 1627 .read = proc_pid_attr_read,
1628 .write = proc_pid_attr_write, 1628 .write = proc_pid_attr_write,
1629}; 1629};
@@ -1644,7 +1644,7 @@ static int proc_attr_dir_readdir(struct file * filp,
1644 attr_dir_stuff,ARRAY_SIZE(attr_dir_stuff)); 1644 attr_dir_stuff,ARRAY_SIZE(attr_dir_stuff));
1645} 1645}
1646 1646
1647static struct file_operations proc_attr_dir_operations = { 1647static const struct file_operations proc_attr_dir_operations = {
1648 .read = generic_read_dir, 1648 .read = generic_read_dir,
1649 .readdir = proc_attr_dir_readdir, 1649 .readdir = proc_attr_dir_readdir,
1650}; 1650};
@@ -1834,7 +1834,7 @@ static int proc_pid_io_accounting(struct task_struct *task, char *buffer)
1834/* 1834/*
1835 * Thread groups 1835 * Thread groups
1836 */ 1836 */
1837static struct file_operations proc_task_operations; 1837static const struct file_operations proc_task_operations;
1838static struct inode_operations proc_task_inode_operations; 1838static struct inode_operations proc_task_inode_operations;
1839 1839
1840static struct pid_entry tgid_base_stuff[] = { 1840static struct pid_entry tgid_base_stuff[] = {
@@ -1894,7 +1894,7 @@ static int proc_tgid_base_readdir(struct file * filp,
1894 tgid_base_stuff,ARRAY_SIZE(tgid_base_stuff)); 1894 tgid_base_stuff,ARRAY_SIZE(tgid_base_stuff));
1895} 1895}
1896 1896
1897static struct file_operations proc_tgid_base_operations = { 1897static const struct file_operations proc_tgid_base_operations = {
1898 .read = generic_read_dir, 1898 .read = generic_read_dir,
1899 .readdir = proc_tgid_base_readdir, 1899 .readdir = proc_tgid_base_readdir,
1900}; 1900};
@@ -2177,7 +2177,7 @@ static struct dentry *proc_tid_base_lookup(struct inode *dir, struct dentry *den
2177 tid_base_stuff, ARRAY_SIZE(tid_base_stuff)); 2177 tid_base_stuff, ARRAY_SIZE(tid_base_stuff));
2178} 2178}
2179 2179
2180static struct file_operations proc_tid_base_operations = { 2180static const struct file_operations proc_tid_base_operations = {
2181 .read = generic_read_dir, 2181 .read = generic_read_dir,
2182 .readdir = proc_tid_base_readdir, 2182 .readdir = proc_tid_base_readdir,
2183}; 2183};
@@ -2414,7 +2414,7 @@ static struct inode_operations proc_task_inode_operations = {
2414 .setattr = proc_setattr, 2414 .setattr = proc_setattr,
2415}; 2415};
2416 2416
2417static struct file_operations proc_task_operations = { 2417static const struct file_operations proc_task_operations = {
2418 .read = generic_read_dir, 2418 .read = generic_read_dir,
2419 .readdir = proc_task_readdir, 2419 .readdir = proc_task_readdir,
2420}; 2420};
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 853cb877d5f3..aa52f1080e62 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -39,7 +39,7 @@ int proc_match(int len, const char *name, struct proc_dir_entry *de)
39 return !memcmp(name, de->name, len); 39 return !memcmp(name, de->name, len);
40} 40}
41 41
42static struct file_operations proc_file_operations = { 42static const struct file_operations proc_file_operations = {
43 .llseek = proc_file_lseek, 43 .llseek = proc_file_lseek,
44 .read = proc_file_read, 44 .read = proc_file_read,
45 .write = proc_file_write, 45 .write = proc_file_write,
@@ -497,7 +497,7 @@ out: unlock_kernel();
497 * use the in-memory "struct proc_dir_entry" tree to parse 497 * use the in-memory "struct proc_dir_entry" tree to parse
498 * the /proc directory. 498 * the /proc directory.
499 */ 499 */
500static struct file_operations proc_dir_operations = { 500static const struct file_operations proc_dir_operations = {
501 .read = generic_read_dir, 501 .read = generic_read_dir,
502 .readdir = proc_readdir, 502 .readdir = proc_readdir,
503}; 503};
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 987c773dbb20..277dcd66ebe2 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -38,13 +38,13 @@ extern int proc_tgid_stat(struct task_struct *, char *);
38extern int proc_pid_status(struct task_struct *, char *); 38extern int proc_pid_status(struct task_struct *, char *);
39extern int proc_pid_statm(struct task_struct *, char *); 39extern int proc_pid_statm(struct task_struct *, char *);
40 40
41extern struct file_operations proc_maps_operations; 41extern const struct file_operations proc_maps_operations;
42extern struct file_operations proc_numa_maps_operations; 42extern const struct file_operations proc_numa_maps_operations;
43extern struct file_operations proc_smaps_operations; 43extern const struct file_operations proc_smaps_operations;
44 44
45extern struct file_operations proc_maps_operations; 45extern const struct file_operations proc_maps_operations;
46extern struct file_operations proc_numa_maps_operations; 46extern const struct file_operations proc_numa_maps_operations;
47extern struct file_operations proc_smaps_operations; 47extern const struct file_operations proc_smaps_operations;
48 48
49 49
50void free_proc_entry(struct proc_dir_entry *de); 50void free_proc_entry(struct proc_dir_entry *de);
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index 5ec67257e5f9..22f789de3909 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -128,7 +128,7 @@ static int proc_nommu_vma_list_open(struct inode *inode, struct file *file)
128 return seq_open(file, &proc_nommu_vma_list_seqop); 128 return seq_open(file, &proc_nommu_vma_list_seqop);
129} 129}
130 130
131static struct file_operations proc_nommu_vma_list_operations = { 131static const struct file_operations proc_nommu_vma_list_operations = {
132 .open = proc_nommu_vma_list_open, 132 .open = proc_nommu_vma_list_open,
133 .read = seq_read, 133 .read = seq_read,
134 .llseek = seq_lseek, 134 .llseek = seq_lseek,
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 5e2d4359c292..e2c4c0a5c90d 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -223,7 +223,7 @@ static int fragmentation_open(struct inode *inode, struct file *file)
223 return seq_open(file, &fragmentation_op); 223 return seq_open(file, &fragmentation_op);
224} 224}
225 225
226static struct file_operations fragmentation_file_operations = { 226static const struct file_operations fragmentation_file_operations = {
227 .open = fragmentation_open, 227 .open = fragmentation_open,
228 .read = seq_read, 228 .read = seq_read,
229 .llseek = seq_lseek, 229 .llseek = seq_lseek,
@@ -236,7 +236,7 @@ static int zoneinfo_open(struct inode *inode, struct file *file)
236 return seq_open(file, &zoneinfo_op); 236 return seq_open(file, &zoneinfo_op);
237} 237}
238 238
239static struct file_operations proc_zoneinfo_file_operations = { 239static const struct file_operations proc_zoneinfo_file_operations = {
240 .open = zoneinfo_open, 240 .open = zoneinfo_open,
241 .read = seq_read, 241 .read = seq_read,
242 .llseek = seq_lseek, 242 .llseek = seq_lseek,
@@ -261,7 +261,7 @@ static int cpuinfo_open(struct inode *inode, struct file *file)
261 return seq_open(file, &cpuinfo_op); 261 return seq_open(file, &cpuinfo_op);
262} 262}
263 263
264static struct file_operations proc_cpuinfo_operations = { 264static const struct file_operations proc_cpuinfo_operations = {
265 .open = cpuinfo_open, 265 .open = cpuinfo_open,
266 .read = seq_read, 266 .read = seq_read,
267 .llseek = seq_lseek, 267 .llseek = seq_lseek,
@@ -320,7 +320,7 @@ static int devinfo_open(struct inode *inode, struct file *filp)
320 return seq_open(filp, &devinfo_ops); 320 return seq_open(filp, &devinfo_ops);
321} 321}
322 322
323static struct file_operations proc_devinfo_operations = { 323static const struct file_operations proc_devinfo_operations = {
324 .open = devinfo_open, 324 .open = devinfo_open,
325 .read = seq_read, 325 .read = seq_read,
326 .llseek = seq_lseek, 326 .llseek = seq_lseek,
@@ -332,7 +332,7 @@ static int vmstat_open(struct inode *inode, struct file *file)
332{ 332{
333 return seq_open(file, &vmstat_op); 333 return seq_open(file, &vmstat_op);
334} 334}
335static struct file_operations proc_vmstat_file_operations = { 335static const struct file_operations proc_vmstat_file_operations = {
336 .open = vmstat_open, 336 .open = vmstat_open,
337 .read = seq_read, 337 .read = seq_read,
338 .llseek = seq_lseek, 338 .llseek = seq_lseek,
@@ -363,7 +363,7 @@ static int partitions_open(struct inode *inode, struct file *file)
363{ 363{
364 return seq_open(file, &partitions_op); 364 return seq_open(file, &partitions_op);
365} 365}
366static struct file_operations proc_partitions_operations = { 366static const struct file_operations proc_partitions_operations = {
367 .open = partitions_open, 367 .open = partitions_open,
368 .read = seq_read, 368 .read = seq_read,
369 .llseek = seq_lseek, 369 .llseek = seq_lseek,
@@ -375,7 +375,7 @@ static int diskstats_open(struct inode *inode, struct file *file)
375{ 375{
376 return seq_open(file, &diskstats_op); 376 return seq_open(file, &diskstats_op);
377} 377}
378static struct file_operations proc_diskstats_operations = { 378static const struct file_operations proc_diskstats_operations = {
379 .open = diskstats_open, 379 .open = diskstats_open,
380 .read = seq_read, 380 .read = seq_read,
381 .llseek = seq_lseek, 381 .llseek = seq_lseek,
@@ -389,7 +389,7 @@ static int modules_open(struct inode *inode, struct file *file)
389{ 389{
390 return seq_open(file, &modules_op); 390 return seq_open(file, &modules_op);
391} 391}
392static struct file_operations proc_modules_operations = { 392static const struct file_operations proc_modules_operations = {
393 .open = modules_open, 393 .open = modules_open,
394 .read = seq_read, 394 .read = seq_read,
395 .llseek = seq_lseek, 395 .llseek = seq_lseek,
@@ -404,7 +404,7 @@ static int slabinfo_open(struct inode *inode, struct file *file)
404{ 404{
405 return seq_open(file, &slabinfo_op); 405 return seq_open(file, &slabinfo_op);
406} 406}
407static struct file_operations proc_slabinfo_operations = { 407static const struct file_operations proc_slabinfo_operations = {
408 .open = slabinfo_open, 408 .open = slabinfo_open,
409 .read = seq_read, 409 .read = seq_read,
410 .write = slabinfo_write, 410 .write = slabinfo_write,
@@ -438,7 +438,7 @@ static int slabstats_release(struct inode *inode, struct file *file)
438 return seq_release(inode, file); 438 return seq_release(inode, file);
439} 439}
440 440
441static struct file_operations proc_slabstats_operations = { 441static const struct file_operations proc_slabstats_operations = {
442 .open = slabstats_open, 442 .open = slabstats_open,
443 .read = seq_read, 443 .read = seq_read,
444 .llseek = seq_lseek, 444 .llseek = seq_lseek,
@@ -551,7 +551,7 @@ static int stat_open(struct inode *inode, struct file *file)
551 kfree(buf); 551 kfree(buf);
552 return res; 552 return res;
553} 553}
554static struct file_operations proc_stat_operations = { 554static const struct file_operations proc_stat_operations = {
555 .open = stat_open, 555 .open = stat_open,
556 .read = seq_read, 556 .read = seq_read,
557 .llseek = seq_lseek, 557 .llseek = seq_lseek,
@@ -593,7 +593,7 @@ static int interrupts_open(struct inode *inode, struct file *filp)
593 return seq_open(filp, &int_seq_ops); 593 return seq_open(filp, &int_seq_ops);
594} 594}
595 595
596static struct file_operations proc_interrupts_operations = { 596static const struct file_operations proc_interrupts_operations = {
597 .open = interrupts_open, 597 .open = interrupts_open,
598 .read = seq_read, 598 .read = seq_read,
599 .llseek = seq_lseek, 599 .llseek = seq_lseek,
@@ -650,7 +650,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
650 return count; 650 return count;
651} 651}
652 652
653static struct file_operations proc_sysrq_trigger_operations = { 653static const struct file_operations proc_sysrq_trigger_operations = {
654 .write = write_sysrq_trigger, 654 .write = write_sysrq_trigger,
655}; 655};
656#endif 656#endif
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c
index 15c4455b09eb..c1bbfbeb035e 100644
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
@@ -138,7 +138,7 @@ static int tty_drivers_open(struct inode *inode, struct file *file)
138 return seq_open(file, &tty_drivers_op); 138 return seq_open(file, &tty_drivers_op);
139} 139}
140 140
141static struct file_operations proc_tty_drivers_operations = { 141static const struct file_operations proc_tty_drivers_operations = {
142 .open = tty_drivers_open, 142 .open = tty_drivers_open,
143 .read = seq_read, 143 .read = seq_read,
144 .llseek = seq_lseek, 144 .llseek = seq_lseek,
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,
136 * <pid> directories. Thus we don't use the generic 136 * <pid> directories. Thus we don't use the generic
137 * directory handling functions for that.. 137 * directory handling functions for that..
138 */ 138 */
139static struct file_operations proc_root_operations = { 139static const struct file_operations proc_root_operations = {
140 .read = generic_read_dir, 140 .read = generic_read_dir,
141 .readdir = proc_root_readdir, 141 .readdir = proc_root_readdir,
142}; 142};
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 55ade0d15621..7445980c8022 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -434,7 +434,7 @@ static int maps_open(struct inode *inode, struct file *file)
434 return do_maps_open(inode, file, &proc_pid_maps_op); 434 return do_maps_open(inode, file, &proc_pid_maps_op);
435} 435}
436 436
437struct file_operations proc_maps_operations = { 437const struct file_operations proc_maps_operations = {
438 .open = maps_open, 438 .open = maps_open,
439 .read = seq_read, 439 .read = seq_read,
440 .llseek = seq_lseek, 440 .llseek = seq_lseek,
@@ -456,7 +456,7 @@ static int numa_maps_open(struct inode *inode, struct file *file)
456 return do_maps_open(inode, file, &proc_pid_numa_maps_op); 456 return do_maps_open(inode, file, &proc_pid_numa_maps_op);
457} 457}
458 458
459struct file_operations proc_numa_maps_operations = { 459const struct file_operations proc_numa_maps_operations = {
460 .open = numa_maps_open, 460 .open = numa_maps_open,
461 .read = seq_read, 461 .read = seq_read,
462 .llseek = seq_lseek, 462 .llseek = seq_lseek,
@@ -469,7 +469,7 @@ static int smaps_open(struct inode *inode, struct file *file)
469 return do_maps_open(inode, file, &proc_pid_smaps_op); 469 return do_maps_open(inode, file, &proc_pid_smaps_op);
470} 470}
471 471
472struct file_operations proc_smaps_operations = { 472const struct file_operations proc_smaps_operations = {
473 .open = smaps_open, 473 .open = smaps_open,
474 .read = seq_read, 474 .read = seq_read,
475 .llseek = seq_lseek, 475 .llseek = seq_lseek,
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index fcc5caf93f55..7cddf6b8635a 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -220,7 +220,7 @@ static int maps_open(struct inode *inode, struct file *file)
220 return ret; 220 return ret;
221} 221}
222 222
223struct file_operations proc_maps_operations = { 223const struct file_operations proc_maps_operations = {
224 .open = maps_open, 224 .open = maps_open,
225 .read = seq_read, 225 .read = seq_read,
226 .llseek = seq_lseek, 226 .llseek = seq_lseek,