aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:36 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:46 -0500
commitda7071d7e32d15149cc513f096a3638097b66387 (patch)
treef56fb200090ad55b2e2a72c379b1eeea29795670
parent9a32144e9d7b4e21341174b1a83b82a82353be86 (diff)
[PATCH] mark struct file_operations const 8
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--net/irda/ircomm/ircomm_core.c2
-rw-r--r--net/irda/iriap.c2
-rw-r--r--net/irda/irlan/irlan_common.c2
-rw-r--r--net/irda/irlap.c2
-rw-r--r--net/irda/irlmp.c2
-rw-r--r--net/irda/irttp.c2
-rw-r--r--net/llc/llc_proc.c4
-rw-r--r--net/netfilter/nf_conntrack_expect.c2
-rw-r--r--net/netfilter/nf_conntrack_standalone.c4
-rw-r--r--net/netfilter/nf_log.c2
-rw-r--r--net/netfilter/nf_queue.c2
-rw-r--r--net/netfilter/nfnetlink_log.c2
-rw-r--r--net/netfilter/nfnetlink_queue.c2
-rw-r--r--net/netfilter/x_tables.c2
-rw-r--r--net/netfilter/xt_hashlimit.c4
-rw-r--r--net/netlink/af_netlink.c2
-rw-r--r--net/netrom/af_netrom.c2
-rw-r--r--net/netrom/nr_route.c4
-rw-r--r--net/packet/af_packet.c2
-rw-r--r--net/rose/af_rose.c2
-rw-r--r--net/rose/rose_route.c6
-rw-r--r--net/rxrpc/proc.c8
-rw-r--r--net/sched/sch_api.c2
-rw-r--r--net/sctp/proc.c6
-rw-r--r--net/socket.c2
-rw-r--r--net/sunrpc/cache.c12
-rw-r--r--net/sunrpc/rpc_pipe.c4
-rw-r--r--net/sunrpc/stats.c2
-rw-r--r--net/unix/af_unix.c2
-rw-r--r--net/wanrouter/wanproc.c6
-rw-r--r--net/x25/x25_proc.c4
31 files changed, 51 insertions, 51 deletions
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
index c28ee7bce26a..ec40715dcdda 100644
--- a/net/irda/ircomm/ircomm_core.c
+++ b/net/irda/ircomm/ircomm_core.c
@@ -56,7 +56,7 @@ static void ircomm_control_indication(struct ircomm_cb *self,
56extern struct proc_dir_entry *proc_irda; 56extern struct proc_dir_entry *proc_irda;
57static int ircomm_seq_open(struct inode *, struct file *); 57static int ircomm_seq_open(struct inode *, struct file *);
58 58
59static struct file_operations ircomm_proc_fops = { 59static const struct file_operations ircomm_proc_fops = {
60 .owner = THIS_MODULE, 60 .owner = THIS_MODULE,
61 .open = ircomm_seq_open, 61 .open = ircomm_seq_open,
62 .read = seq_read, 62 .read = seq_read,
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index 98b0fa965790..915d9384f36a 100644
--- a/net/irda/iriap.c
+++ b/net/irda/iriap.c
@@ -1080,7 +1080,7 @@ static int irias_seq_open(struct inode *inode, struct file *file)
1080 return seq_open(file, &irias_seq_ops); 1080 return seq_open(file, &irias_seq_ops);
1081} 1081}
1082 1082
1083struct file_operations irias_seq_fops = { 1083const struct file_operations irias_seq_fops = {
1084 .owner = THIS_MODULE, 1084 .owner = THIS_MODULE,
1085 .open = irias_seq_open, 1085 .open = irias_seq_open,
1086 .read = seq_read, 1086 .read = seq_read,
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index 9c3dc57ff746..fcf9d6599628 100644
--- a/net/irda/irlan/irlan_common.c
+++ b/net/irda/irlan/irlan_common.c
@@ -93,7 +93,7 @@ extern struct proc_dir_entry *proc_irda;
93 93
94static int irlan_seq_open(struct inode *inode, struct file *file); 94static int irlan_seq_open(struct inode *inode, struct file *file);
95 95
96static struct file_operations irlan_fops = { 96static const struct file_operations irlan_fops = {
97 .owner = THIS_MODULE, 97 .owner = THIS_MODULE,
98 .open = irlan_seq_open, 98 .open = irlan_seq_open,
99 .read = seq_read, 99 .read = seq_read,
diff --git a/net/irda/irlap.c b/net/irda/irlap.c
index fd73e4af715a..d93ebd11431e 100644
--- a/net/irda/irlap.c
+++ b/net/irda/irlap.c
@@ -1244,7 +1244,7 @@ out_kfree:
1244 goto out; 1244 goto out;
1245} 1245}
1246 1246
1247struct file_operations irlap_seq_fops = { 1247const struct file_operations irlap_seq_fops = {
1248 .owner = THIS_MODULE, 1248 .owner = THIS_MODULE,
1249 .open = irlap_seq_open, 1249 .open = irlap_seq_open,
1250 .read = seq_read, 1250 .read = seq_read,
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
index b134c3cf2bdb..9df0461b6d18 100644
--- a/net/irda/irlmp.c
+++ b/net/irda/irlmp.c
@@ -2026,7 +2026,7 @@ out_kfree:
2026 goto out; 2026 goto out;
2027} 2027}
2028 2028
2029struct file_operations irlmp_seq_fops = { 2029const struct file_operations irlmp_seq_fops = {
2030 .owner = THIS_MODULE, 2030 .owner = THIS_MODULE,
2031 .open = irlmp_seq_open, 2031 .open = irlmp_seq_open,
2032 .read = seq_read, 2032 .read = seq_read,
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 68836358fdf2..a7486b3bddcb 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -1895,7 +1895,7 @@ out_kfree:
1895 goto out; 1895 goto out;
1896} 1896}
1897 1897
1898struct file_operations irttp_seq_fops = { 1898const struct file_operations irttp_seq_fops = {
1899 .owner = THIS_MODULE, 1899 .owner = THIS_MODULE,
1900 .open = irttp_seq_open, 1900 .open = irttp_seq_open,
1901 .read = seq_read, 1901 .read = seq_read,
diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c
index dcfe6c739471..3ab9d9f8b17f 100644
--- a/net/llc/llc_proc.c
+++ b/net/llc/llc_proc.c
@@ -208,7 +208,7 @@ static int llc_seq_core_open(struct inode *inode, struct file *file)
208 return seq_open(file, &llc_seq_core_ops); 208 return seq_open(file, &llc_seq_core_ops);
209} 209}
210 210
211static struct file_operations llc_seq_socket_fops = { 211static const struct file_operations llc_seq_socket_fops = {
212 .owner = THIS_MODULE, 212 .owner = THIS_MODULE,
213 .open = llc_seq_socket_open, 213 .open = llc_seq_socket_open,
214 .read = seq_read, 214 .read = seq_read,
@@ -216,7 +216,7 @@ static struct file_operations llc_seq_socket_fops = {
216 .release = seq_release, 216 .release = seq_release,
217}; 217};
218 218
219static struct file_operations llc_seq_core_fops = { 219static const struct file_operations llc_seq_core_fops = {
220 .owner = THIS_MODULE, 220 .owner = THIS_MODULE,
221 .open = llc_seq_core_open, 221 .open = llc_seq_core_open,
222 .read = seq_read, 222 .read = seq_read,
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index 9cbf926cdd14..5cdcd7f4e813 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -435,7 +435,7 @@ static int exp_open(struct inode *inode, struct file *file)
435 return seq_open(file, &exp_seq_ops); 435 return seq_open(file, &exp_seq_ops);
436} 436}
437 437
438struct file_operations exp_file_ops = { 438const struct file_operations exp_file_ops = {
439 .owner = THIS_MODULE, 439 .owner = THIS_MODULE,
440 .open = exp_open, 440 .open = exp_open,
441 .read = seq_read, 441 .read = seq_read,
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index f1cb60ff9319..04ac12431db7 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -229,7 +229,7 @@ out_free:
229 return ret; 229 return ret;
230} 230}
231 231
232static struct file_operations ct_file_ops = { 232static const struct file_operations ct_file_ops = {
233 .owner = THIS_MODULE, 233 .owner = THIS_MODULE,
234 .open = ct_open, 234 .open = ct_open,
235 .read = seq_read, 235 .read = seq_read,
@@ -317,7 +317,7 @@ static int ct_cpu_seq_open(struct inode *inode, struct file *file)
317 return seq_open(file, &ct_cpu_seq_ops); 317 return seq_open(file, &ct_cpu_seq_ops);
318} 318}
319 319
320static struct file_operations ct_cpu_seq_fops = { 320static const struct file_operations ct_cpu_seq_fops = {
321 .owner = THIS_MODULE, 321 .owner = THIS_MODULE,
322 .open = ct_cpu_seq_open, 322 .open = ct_cpu_seq_open,
323 .read = seq_read, 323 .read = seq_read,
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 8901b3a07f7e..07e28e089616 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -151,7 +151,7 @@ static int nflog_open(struct inode *inode, struct file *file)
151 return seq_open(file, &nflog_seq_ops); 151 return seq_open(file, &nflog_seq_ops);
152} 152}
153 153
154static struct file_operations nflog_file_ops = { 154static const struct file_operations nflog_file_ops = {
155 .owner = THIS_MODULE, 155 .owner = THIS_MODULE,
156 .open = nflog_open, 156 .open = nflog_open,
157 .read = seq_read, 157 .read = seq_read,
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
index 4d8936ed581d..e136fea1db22 100644
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -331,7 +331,7 @@ static int nfqueue_open(struct inode *inode, struct file *file)
331 return seq_open(file, &nfqueue_seq_ops); 331 return seq_open(file, &nfqueue_seq_ops);
332} 332}
333 333
334static struct file_operations nfqueue_file_ops = { 334static const struct file_operations nfqueue_file_ops = {
335 .owner = THIS_MODULE, 335 .owner = THIS_MODULE,
336 .open = nfqueue_open, 336 .open = nfqueue_open,
337 .read = seq_read, 337 .read = seq_read,
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index d1505dd25c66..c47e7e2ba642 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -1025,7 +1025,7 @@ out_free:
1025 return ret; 1025 return ret;
1026} 1026}
1027 1027
1028static struct file_operations nful_file_ops = { 1028static const struct file_operations nful_file_ops = {
1029 .owner = THIS_MODULE, 1029 .owner = THIS_MODULE,
1030 .open = nful_open, 1030 .open = nful_open,
1031 .read = seq_read, 1031 .read = seq_read,
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index a88a017da22c..99e516eca41a 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -1077,7 +1077,7 @@ out_free:
1077 return ret; 1077 return ret;
1078} 1078}
1079 1079
1080static struct file_operations nfqnl_file_ops = { 1080static const struct file_operations nfqnl_file_ops = {
1081 .owner = THIS_MODULE, 1081 .owner = THIS_MODULE,
1082 .open = nfqnl_open, 1082 .open = nfqnl_open,
1083 .read = seq_read, 1083 .read = seq_read,
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 8996584b8499..134cc88f8c83 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -772,7 +772,7 @@ static int xt_tgt_open(struct inode *inode, struct file *file)
772 return ret; 772 return ret;
773} 773}
774 774
775static struct file_operations xt_file_ops = { 775static const struct file_operations xt_file_ops = {
776 .owner = THIS_MODULE, 776 .owner = THIS_MODULE,
777 .open = xt_tgt_open, 777 .open = xt_tgt_open,
778 .read = seq_read, 778 .read = seq_read,
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index bd1f7a2048d6..269a1e793478 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -37,7 +37,7 @@ MODULE_ALIAS("ip6t_hashlimit");
37/* need to declare this at the top */ 37/* need to declare this at the top */
38static struct proc_dir_entry *hashlimit_procdir4; 38static struct proc_dir_entry *hashlimit_procdir4;
39static struct proc_dir_entry *hashlimit_procdir6; 39static struct proc_dir_entry *hashlimit_procdir6;
40static struct file_operations dl_file_ops; 40static const struct file_operations dl_file_ops;
41 41
42/* hash table crap */ 42/* hash table crap */
43struct dsthash_dst { 43struct dsthash_dst {
@@ -714,7 +714,7 @@ static int dl_proc_open(struct inode *inode, struct file *file)
714 return ret; 714 return ret;
715} 715}
716 716
717static struct file_operations dl_file_ops = { 717static const struct file_operations dl_file_ops = {
718 .owner = THIS_MODULE, 718 .owner = THIS_MODULE,
719 .open = dl_proc_open, 719 .open = dl_proc_open,
720 .read = seq_read, 720 .read = seq_read,
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index f6ee9b47428b..e73d8f546c6b 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1713,7 +1713,7 @@ static int netlink_seq_open(struct inode *inode, struct file *file)
1713 return 0; 1713 return 0;
1714} 1714}
1715 1715
1716static struct file_operations netlink_seq_fops = { 1716static const struct file_operations netlink_seq_fops = {
1717 .owner = THIS_MODULE, 1717 .owner = THIS_MODULE,
1718 .open = netlink_seq_open, 1718 .open = netlink_seq_open,
1719 .read = seq_read, 1719 .read = seq_read,
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 799b76806bc3..bf9837dd95c4 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1335,7 +1335,7 @@ static int nr_info_open(struct inode *inode, struct file *file)
1335 return seq_open(file, &nr_info_seqops); 1335 return seq_open(file, &nr_info_seqops);
1336} 1336}
1337 1337
1338static struct file_operations nr_info_fops = { 1338static const struct file_operations nr_info_fops = {
1339 .owner = THIS_MODULE, 1339 .owner = THIS_MODULE,
1340 .open = nr_info_open, 1340 .open = nr_info_open,
1341 .read = seq_read, 1341 .read = seq_read,
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index e9909aeb43e9..c2fbac9c69ce 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -934,7 +934,7 @@ static int nr_node_info_open(struct inode *inode, struct file *file)
934 return seq_open(file, &nr_node_seqops); 934 return seq_open(file, &nr_node_seqops);
935} 935}
936 936
937struct file_operations nr_nodes_fops = { 937const struct file_operations nr_nodes_fops = {
938 .owner = THIS_MODULE, 938 .owner = THIS_MODULE,
939 .open = nr_node_info_open, 939 .open = nr_node_info_open,
940 .read = seq_read, 940 .read = seq_read,
@@ -1018,7 +1018,7 @@ static int nr_neigh_info_open(struct inode *inode, struct file *file)
1018 return seq_open(file, &nr_neigh_seqops); 1018 return seq_open(file, &nr_neigh_seqops);
1019} 1019}
1020 1020
1021struct file_operations nr_neigh_fops = { 1021const struct file_operations nr_neigh_fops = {
1022 .owner = THIS_MODULE, 1022 .owner = THIS_MODULE,
1023 .open = nr_neigh_info_open, 1023 .open = nr_neigh_info_open,
1024 .read = seq_read, 1024 .read = seq_read,
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 444550917bc1..15ff7b15e211 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1952,7 +1952,7 @@ static int packet_seq_open(struct inode *inode, struct file *file)
1952 return seq_open(file, &packet_seq_ops); 1952 return seq_open(file, &packet_seq_ops);
1953} 1953}
1954 1954
1955static struct file_operations packet_seq_fops = { 1955static const struct file_operations packet_seq_fops = {
1956 .owner = THIS_MODULE, 1956 .owner = THIS_MODULE,
1957 .open = packet_seq_open, 1957 .open = packet_seq_open,
1958 .read = seq_read, 1958 .read = seq_read,
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 7a81a8ee8544..8c34f1ca6c8c 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -1440,7 +1440,7 @@ static int rose_info_open(struct inode *inode, struct file *file)
1440 return seq_open(file, &rose_info_seqops); 1440 return seq_open(file, &rose_info_seqops);
1441} 1441}
1442 1442
1443static struct file_operations rose_info_fops = { 1443static const struct file_operations rose_info_fops = {
1444 .owner = THIS_MODULE, 1444 .owner = THIS_MODULE,
1445 .open = rose_info_open, 1445 .open = rose_info_open,
1446 .read = seq_read, 1446 .read = seq_read,
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 0dcca4289eeb..1ddf7f5fa6db 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -1129,7 +1129,7 @@ static int rose_nodes_open(struct inode *inode, struct file *file)
1129 return seq_open(file, &rose_node_seqops); 1129 return seq_open(file, &rose_node_seqops);
1130} 1130}
1131 1131
1132struct file_operations rose_nodes_fops = { 1132const struct file_operations rose_nodes_fops = {
1133 .owner = THIS_MODULE, 1133 .owner = THIS_MODULE,
1134 .open = rose_nodes_open, 1134 .open = rose_nodes_open,
1135 .read = seq_read, 1135 .read = seq_read,
@@ -1211,7 +1211,7 @@ static int rose_neigh_open(struct inode *inode, struct file *file)
1211 return seq_open(file, &rose_neigh_seqops); 1211 return seq_open(file, &rose_neigh_seqops);
1212} 1212}
1213 1213
1214struct file_operations rose_neigh_fops = { 1214const struct file_operations rose_neigh_fops = {
1215 .owner = THIS_MODULE, 1215 .owner = THIS_MODULE,
1216 .open = rose_neigh_open, 1216 .open = rose_neigh_open,
1217 .read = seq_read, 1217 .read = seq_read,
@@ -1295,7 +1295,7 @@ static int rose_route_open(struct inode *inode, struct file *file)
1295 return seq_open(file, &rose_route_seqops); 1295 return seq_open(file, &rose_route_seqops);
1296} 1296}
1297 1297
1298struct file_operations rose_routes_fops = { 1298const struct file_operations rose_routes_fops = {
1299 .owner = THIS_MODULE, 1299 .owner = THIS_MODULE,
1300 .open = rose_route_open, 1300 .open = rose_route_open,
1301 .read = seq_read, 1301 .read = seq_read,
diff --git a/net/rxrpc/proc.c b/net/rxrpc/proc.c
index 29975d99d864..8551c879e456 100644
--- a/net/rxrpc/proc.c
+++ b/net/rxrpc/proc.c
@@ -37,7 +37,7 @@ static struct seq_operations rxrpc_proc_transports_ops = {
37 .show = rxrpc_proc_transports_show, 37 .show = rxrpc_proc_transports_show,
38}; 38};
39 39
40static struct file_operations rxrpc_proc_transports_fops = { 40static const struct file_operations rxrpc_proc_transports_fops = {
41 .open = rxrpc_proc_transports_open, 41 .open = rxrpc_proc_transports_open,
42 .read = seq_read, 42 .read = seq_read,
43 .llseek = seq_lseek, 43 .llseek = seq_lseek,
@@ -57,7 +57,7 @@ static struct seq_operations rxrpc_proc_peers_ops = {
57 .show = rxrpc_proc_peers_show, 57 .show = rxrpc_proc_peers_show,
58}; 58};
59 59
60static struct file_operations rxrpc_proc_peers_fops = { 60static const struct file_operations rxrpc_proc_peers_fops = {
61 .open = rxrpc_proc_peers_open, 61 .open = rxrpc_proc_peers_open,
62 .read = seq_read, 62 .read = seq_read,
63 .llseek = seq_lseek, 63 .llseek = seq_lseek,
@@ -77,7 +77,7 @@ static struct seq_operations rxrpc_proc_conns_ops = {
77 .show = rxrpc_proc_conns_show, 77 .show = rxrpc_proc_conns_show,
78}; 78};
79 79
80static struct file_operations rxrpc_proc_conns_fops = { 80static const struct file_operations rxrpc_proc_conns_fops = {
81 .open = rxrpc_proc_conns_open, 81 .open = rxrpc_proc_conns_open,
82 .read = seq_read, 82 .read = seq_read,
83 .llseek = seq_lseek, 83 .llseek = seq_lseek,
@@ -97,7 +97,7 @@ static struct seq_operations rxrpc_proc_calls_ops = {
97 .show = rxrpc_proc_calls_show, 97 .show = rxrpc_proc_calls_show,
98}; 98};
99 99
100static struct file_operations rxrpc_proc_calls_fops = { 100static const struct file_operations rxrpc_proc_calls_fops = {
101 .open = rxrpc_proc_calls_open, 101 .open = rxrpc_proc_calls_open,
102 .read = seq_read, 102 .read = seq_read,
103 .llseek = seq_lseek, 103 .llseek = seq_lseek,
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 60b92fcdc8bb..4158127bc202 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1194,7 +1194,7 @@ static int psched_open(struct inode *inode, struct file *file)
1194 return single_open(file, psched_show, PDE(inode)->data); 1194 return single_open(file, psched_show, PDE(inode)->data);
1195} 1195}
1196 1196
1197static struct file_operations psched_fops = { 1197static const struct file_operations psched_fops = {
1198 .owner = THIS_MODULE, 1198 .owner = THIS_MODULE,
1199 .open = psched_open, 1199 .open = psched_open,
1200 .read = seq_read, 1200 .read = seq_read,
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index e93fc1cc430a..2f12bf2d8d3c 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -114,7 +114,7 @@ static int sctp_snmp_seq_open(struct inode *inode, struct file *file)
114 return single_open(file, sctp_snmp_seq_show, NULL); 114 return single_open(file, sctp_snmp_seq_show, NULL);
115} 115}
116 116
117static struct file_operations sctp_snmp_seq_fops = { 117static const struct file_operations sctp_snmp_seq_fops = {
118 .owner = THIS_MODULE, 118 .owner = THIS_MODULE,
119 .open = sctp_snmp_seq_open, 119 .open = sctp_snmp_seq_open,
120 .read = seq_read, 120 .read = seq_read,
@@ -264,7 +264,7 @@ static int sctp_eps_seq_open(struct inode *inode, struct file *file)
264 return seq_open(file, &sctp_eps_ops); 264 return seq_open(file, &sctp_eps_ops);
265} 265}
266 266
267static struct file_operations sctp_eps_seq_fops = { 267static const struct file_operations sctp_eps_seq_fops = {
268 .open = sctp_eps_seq_open, 268 .open = sctp_eps_seq_open,
269 .read = seq_read, 269 .read = seq_read,
270 .llseek = seq_lseek, 270 .llseek = seq_lseek,
@@ -374,7 +374,7 @@ static int sctp_assocs_seq_open(struct inode *inode, struct file *file)
374 return seq_open(file, &sctp_assoc_ops); 374 return seq_open(file, &sctp_assoc_ops);
375} 375}
376 376
377static struct file_operations sctp_assocs_seq_fops = { 377static const struct file_operations sctp_assocs_seq_fops = {
378 .open = sctp_assocs_seq_open, 378 .open = sctp_assocs_seq_open,
379 .read = seq_read, 379 .read = seq_read,
380 .llseek = seq_lseek, 380 .llseek = seq_lseek,
diff --git a/net/socket.c b/net/socket.c
index a92f59580234..0778c5442411 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -117,7 +117,7 @@ static ssize_t sock_sendpage(struct file *file, struct page *page,
117 * in the operation structures but are done directly via the socketcall() multiplexor. 117 * in the operation structures but are done directly via the socketcall() multiplexor.
118 */ 118 */
119 119
120static struct file_operations socket_file_ops = { 120static const struct file_operations socket_file_ops = {
121 .owner = THIS_MODULE, 121 .owner = THIS_MODULE,
122 .llseek = no_llseek, 122 .llseek = no_llseek,
123 .aio_read = sock_aio_read, 123 .aio_read = sock_aio_read,
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index c80df455802d..8612044b9189 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -282,9 +282,9 @@ static DEFINE_SPINLOCK(cache_list_lock);
282static struct cache_detail *current_detail; 282static struct cache_detail *current_detail;
283static int current_index; 283static int current_index;
284 284
285static struct file_operations cache_file_operations; 285static const struct file_operations cache_file_operations;
286static struct file_operations content_file_operations; 286static const struct file_operations content_file_operations;
287static struct file_operations cache_flush_operations; 287static const struct file_operations cache_flush_operations;
288 288
289static void do_cache_clean(struct work_struct *work); 289static void do_cache_clean(struct work_struct *work);
290static DECLARE_DELAYED_WORK(cache_cleaner, do_cache_clean); 290static DECLARE_DELAYED_WORK(cache_cleaner, do_cache_clean);
@@ -887,7 +887,7 @@ cache_release(struct inode *inode, struct file *filp)
887 887
888 888
889 889
890static struct file_operations cache_file_operations = { 890static const struct file_operations cache_file_operations = {
891 .owner = THIS_MODULE, 891 .owner = THIS_MODULE,
892 .llseek = no_llseek, 892 .llseek = no_llseek,
893 .read = cache_read, 893 .read = cache_read,
@@ -1245,7 +1245,7 @@ static int content_release(struct inode *inode, struct file *file)
1245 return seq_release(inode, file); 1245 return seq_release(inode, file);
1246} 1246}
1247 1247
1248static struct file_operations content_file_operations = { 1248static const struct file_operations content_file_operations = {
1249 .open = content_open, 1249 .open = content_open,
1250 .read = seq_read, 1250 .read = seq_read,
1251 .llseek = seq_lseek, 1251 .llseek = seq_lseek,
@@ -1297,7 +1297,7 @@ static ssize_t write_flush(struct file * file, const char __user * buf,
1297 return count; 1297 return count;
1298} 1298}
1299 1299
1300static struct file_operations cache_flush_operations = { 1300static const struct file_operations cache_flush_operations = {
1301 .open = nonseekable_open, 1301 .open = nonseekable_open,
1302 .read = read_flush, 1302 .read = read_flush,
1303 .write = write_flush, 1303 .write = write_flush,
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 89273d35e0cc..e1fad77a2257 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -309,7 +309,7 @@ rpc_pipe_ioctl(struct inode *ino, struct file *filp,
309 } 309 }
310} 310}
311 311
312static struct file_operations rpc_pipe_fops = { 312static const struct file_operations rpc_pipe_fops = {
313 .owner = THIS_MODULE, 313 .owner = THIS_MODULE,
314 .llseek = no_llseek, 314 .llseek = no_llseek,
315 .read = rpc_pipe_read, 315 .read = rpc_pipe_read,
@@ -366,7 +366,7 @@ rpc_info_release(struct inode *inode, struct file *file)
366 return single_release(inode, file); 366 return single_release(inode, file);
367} 367}
368 368
369static struct file_operations rpc_info_operations = { 369static const struct file_operations rpc_info_operations = {
370 .owner = THIS_MODULE, 370 .owner = THIS_MODULE,
371 .open = rpc_info_open, 371 .open = rpc_info_open,
372 .read = seq_read, 372 .read = seq_read,
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c
index bd98124c3a64..044d9484bb8c 100644
--- a/net/sunrpc/stats.c
+++ b/net/sunrpc/stats.c
@@ -66,7 +66,7 @@ static int rpc_proc_open(struct inode *inode, struct file *file)
66 return single_open(file, rpc_proc_show, PDE(inode)->data); 66 return single_open(file, rpc_proc_show, PDE(inode)->data);
67} 67}
68 68
69static struct file_operations rpc_proc_fops = { 69static const struct file_operations rpc_proc_fops = {
70 .owner = THIS_MODULE, 70 .owner = THIS_MODULE,
71 .open = rpc_proc_open, 71 .open = rpc_proc_open,
72 .read = seq_read, 72 .read = seq_read,
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index ac9478d0ca8b..606971645b33 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2040,7 +2040,7 @@ out_kfree:
2040 goto out; 2040 goto out;
2041} 2041}
2042 2042
2043static struct file_operations unix_seq_fops = { 2043static const struct file_operations unix_seq_fops = {
2044 .owner = THIS_MODULE, 2044 .owner = THIS_MODULE,
2045 .open = unix_seq_open, 2045 .open = unix_seq_open,
2046 .read = seq_read, 2046 .read = seq_read,
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c
index abce82873604..205106521ecb 100644
--- a/net/wanrouter/wanproc.c
+++ b/net/wanrouter/wanproc.c
@@ -188,7 +188,7 @@ static int status_open(struct inode *inode, struct file *file)
188 return seq_open(file, &status_op); 188 return seq_open(file, &status_op);
189} 189}
190 190
191static struct file_operations config_fops = { 191static const struct file_operations config_fops = {
192 .owner = THIS_MODULE, 192 .owner = THIS_MODULE,
193 .open = config_open, 193 .open = config_open,
194 .read = seq_read, 194 .read = seq_read,
@@ -196,7 +196,7 @@ static struct file_operations config_fops = {
196 .release = seq_release, 196 .release = seq_release,
197}; 197};
198 198
199static struct file_operations status_fops = { 199static const struct file_operations status_fops = {
200 .owner = THIS_MODULE, 200 .owner = THIS_MODULE,
201 .open = status_open, 201 .open = status_open,
202 .read = seq_read, 202 .read = seq_read,
@@ -271,7 +271,7 @@ static int wandev_open(struct inode *inode, struct file *file)
271 return single_open(file, wandev_show, PDE(inode)->data); 271 return single_open(file, wandev_show, PDE(inode)->data);
272} 272}
273 273
274static struct file_operations wandev_fops = { 274static const struct file_operations wandev_fops = {
275 .owner = THIS_MODULE, 275 .owner = THIS_MODULE,
276 .open = wandev_open, 276 .open = wandev_open,
277 .read = seq_read, 277 .read = seq_read,
diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c
index 3c9f1ba56221..96001f0c64fc 100644
--- a/net/x25/x25_proc.c
+++ b/net/x25/x25_proc.c
@@ -270,7 +270,7 @@ static int x25_seq_forward_open(struct inode *inode, struct file *file)
270 return seq_open(file, &x25_seq_forward_ops); 270 return seq_open(file, &x25_seq_forward_ops);
271} 271}
272 272
273static struct file_operations x25_seq_socket_fops = { 273static const struct file_operations x25_seq_socket_fops = {
274 .owner = THIS_MODULE, 274 .owner = THIS_MODULE,
275 .open = x25_seq_socket_open, 275 .open = x25_seq_socket_open,
276 .read = seq_read, 276 .read = seq_read,
@@ -278,7 +278,7 @@ static struct file_operations x25_seq_socket_fops = {
278 .release = seq_release, 278 .release = seq_release,
279}; 279};
280 280
281static struct file_operations x25_seq_route_fops = { 281static const struct file_operations x25_seq_route_fops = {
282 .owner = THIS_MODULE, 282 .owner = THIS_MODULE,
283 .open = x25_seq_route_open, 283 .open = x25_seq_route_open,
284 .read = seq_read, 284 .read = seq_read,