aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosef 'Jeff' Sipek <jsipek@cs.sunysb.edu>2007-02-12 03:55:41 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:47 -0500
commitee9b6d61a2a43c5952eb43283f8db284a4e70b8a (patch)
treeafb0340e79d3e9d14f39df20e165ce2efe941b18
parentc5ef1c42c51b1b5b4a401a6517bdda30933ddbaf (diff)
[PATCH] Mark struct super_operations const
This patch is inspired by Arjan's "Patch series to mark struct file_operations and struct inode_operations const". Compile tested with gcc & sparse. Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/9p/vfs_super.c4
-rw-r--r--fs/adfs/super.c2
-rw-r--r--fs/affs/super.c2
-rw-r--r--fs/afs/super.c2
-rw-r--r--fs/autofs/inode.c2
-rw-r--r--fs/autofs4/inode.c2
-rw-r--r--fs/bfs/inode.c2
-rw-r--r--fs/binfmt_misc.c2
-rw-r--r--fs/block_dev.c2
-rw-r--r--fs/cifs/cifsfs.c4
-rw-r--r--fs/cifs/cifsfs.h2
-rw-r--r--fs/coda/inode.c2
-rw-r--r--fs/configfs/mount.c2
-rw-r--r--fs/cramfs/inode.c4
-rw-r--r--fs/devpts/inode.c2
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h2
-rw-r--r--fs/ecryptfs/super.c2
-rw-r--r--fs/efs/super.c2
-rw-r--r--fs/ext2/super.c2
-rw-r--r--fs/ext3/super.c2
-rw-r--r--fs/ext4/super.c2
-rw-r--r--fs/fat/inode.c2
-rw-r--r--fs/freevxfs/vxfs_super.c2
-rw-r--r--fs/fuse/inode.c2
-rw-r--r--fs/gfs2/ops_super.c2
-rw-r--r--fs/gfs2/ops_super.h2
-rw-r--r--fs/hfs/super.c2
-rw-r--r--fs/hfsplus/super.c2
-rw-r--r--fs/hostfs/hostfs_kern.c2
-rw-r--r--fs/hpfs/super.c2
-rw-r--r--fs/hppfs/hppfs_kern.c4
-rw-r--r--fs/hugetlbfs/inode.c4
-rw-r--r--fs/inode.c6
-rw-r--r--fs/isofs/inode.c2
-rw-r--r--fs/jffs/inode-v23.c4
-rw-r--r--fs/jffs2/super.c2
-rw-r--r--fs/jfs/super.c4
-rw-r--r--fs/libfs.c4
-rw-r--r--fs/minix/inode.c2
-rw-r--r--fs/ncpfs/inode.c2
-rw-r--r--fs/nfs/super.c4
-rw-r--r--fs/ntfs/super.c2
-rw-r--r--fs/ocfs2/dlm/dlmfs.c4
-rw-r--r--fs/ocfs2/super.c2
-rw-r--r--fs/openpromfs/inode.c2
-rw-r--r--fs/proc/inode.c2
-rw-r--r--fs/qnx4/inode.c4
-rw-r--r--fs/ramfs/inode.c4
-rw-r--r--fs/reiserfs/super.c2
-rw-r--r--fs/romfs/inode.c4
-rw-r--r--fs/smbfs/inode.c2
-rw-r--r--fs/super.c2
-rw-r--r--fs/sysfs/mount.c2
-rw-r--r--fs/sysv/inode.c2
-rw-r--r--fs/sysv/sysv.h2
-rw-r--r--fs/udf/super.c2
-rw-r--r--fs/ufs/super.c4
-rw-r--r--include/linux/fs.h4
58 files changed, 75 insertions, 75 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 63320d4e15d2..0ec42f665457 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -45,7 +45,7 @@
45#include "fid.h" 45#include "fid.h"
46 46
47static void v9fs_clear_inode(struct inode *); 47static void v9fs_clear_inode(struct inode *);
48static struct super_operations v9fs_super_ops; 48static const struct super_operations v9fs_super_ops;
49 49
50/** 50/**
51 * v9fs_clear_inode - release an inode 51 * v9fs_clear_inode - release an inode
@@ -263,7 +263,7 @@ v9fs_umount_begin(struct vfsmount *vfsmnt, int flags)
263 v9fs_session_cancel(v9ses); 263 v9fs_session_cancel(v9ses);
264} 264}
265 265
266static struct super_operations v9fs_super_ops = { 266static const struct super_operations v9fs_super_ops = {
267 .statfs = simple_statfs, 267 .statfs = simple_statfs,
268 .clear_inode = v9fs_clear_inode, 268 .clear_inode = v9fs_clear_inode,
269 .show_options = v9fs_show_options, 269 .show_options = v9fs_show_options,
diff --git a/fs/adfs/super.c b/fs/adfs/super.c
index 5023351a7afe..2e5f2c8371ee 100644
--- a/fs/adfs/super.c
+++ b/fs/adfs/super.c
@@ -254,7 +254,7 @@ static void destroy_inodecache(void)
254 kmem_cache_destroy(adfs_inode_cachep); 254 kmem_cache_destroy(adfs_inode_cachep);
255} 255}
256 256
257static struct super_operations adfs_sops = { 257static const struct super_operations adfs_sops = {
258 .alloc_inode = adfs_alloc_inode, 258 .alloc_inode = adfs_alloc_inode,
259 .destroy_inode = adfs_destroy_inode, 259 .destroy_inode = adfs_destroy_inode,
260 .write_inode = adfs_write_inode, 260 .write_inode = adfs_write_inode,
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 3de93e799949..a324045d8554 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -112,7 +112,7 @@ static void destroy_inodecache(void)
112 kmem_cache_destroy(affs_inode_cachep); 112 kmem_cache_destroy(affs_inode_cachep);
113} 113}
114 114
115static struct super_operations affs_sops = { 115static const struct super_operations affs_sops = {
116 .alloc_inode = affs_alloc_inode, 116 .alloc_inode = affs_alloc_inode,
117 .destroy_inode = affs_destroy_inode, 117 .destroy_inode = affs_destroy_inode,
118 .read_inode = affs_read_inode, 118 .read_inode = affs_read_inode,
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 18d9b77ba40f..eb7e32349da3 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -56,7 +56,7 @@ struct file_system_type afs_fs_type = {
56 .fs_flags = FS_BINARY_MOUNTDATA, 56 .fs_flags = FS_BINARY_MOUNTDATA,
57}; 57};
58 58
59static struct super_operations afs_super_ops = { 59static const struct super_operations afs_super_ops = {
60 .statfs = simple_statfs, 60 .statfs = simple_statfs,
61 .alloc_inode = afs_alloc_inode, 61 .alloc_inode = afs_alloc_inode,
62 .drop_inode = generic_delete_inode, 62 .drop_inode = generic_delete_inode,
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c
index f968d1342808..aa0b61ff8270 100644
--- a/fs/autofs/inode.c
+++ b/fs/autofs/inode.c
@@ -52,7 +52,7 @@ out_kill_sb:
52 52
53static void autofs_read_inode(struct inode *inode); 53static void autofs_read_inode(struct inode *inode);
54 54
55static struct super_operations autofs_sops = { 55static const struct super_operations autofs_sops = {
56 .read_inode = autofs_read_inode, 56 .read_inode = autofs_read_inode,
57 .statfs = simple_statfs, 57 .statfs = simple_statfs,
58}; 58};
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index e8f6c5ad3e90..5e458e096ef6 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -196,7 +196,7 @@ static int autofs4_show_options(struct seq_file *m, struct vfsmount *mnt)
196 return 0; 196 return 0;
197} 197}
198 198
199static struct super_operations autofs4_sops = { 199static const struct super_operations autofs4_sops = {
200 .statfs = simple_statfs, 200 .statfs = simple_statfs,
201 .show_options = autofs4_show_options, 201 .show_options = autofs4_show_options,
202}; 202};
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index 134c99941a63..93d6219243ad 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -270,7 +270,7 @@ static void destroy_inodecache(void)
270 kmem_cache_destroy(bfs_inode_cachep); 270 kmem_cache_destroy(bfs_inode_cachep);
271} 271}
272 272
273static struct super_operations bfs_sops = { 273static const struct super_operations bfs_sops = {
274 .alloc_inode = bfs_alloc_inode, 274 .alloc_inode = bfs_alloc_inode,
275 .destroy_inode = bfs_destroy_inode, 275 .destroy_inode = bfs_destroy_inode,
276 .read_inode = bfs_read_inode, 276 .read_inode = bfs_read_inode,
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index c2e08252af35..e6f57990b121 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -719,7 +719,7 @@ static const struct file_operations bm_status_operations = {
719 719
720/* Superblock handling */ 720/* Superblock handling */
721 721
722static struct super_operations s_ops = { 722static const struct super_operations s_ops = {
723 .statfs = simple_statfs, 723 .statfs = simple_statfs,
724 .clear_inode = bm_clear_inode, 724 .clear_inode = bm_clear_inode,
725}; 725};
diff --git a/fs/block_dev.c b/fs/block_dev.c
index fc7028b685f2..0c59b703e9d5 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -489,7 +489,7 @@ static void bdev_clear_inode(struct inode *inode)
489 spin_unlock(&bdev_lock); 489 spin_unlock(&bdev_lock);
490} 490}
491 491
492static struct super_operations bdev_sops = { 492static const struct super_operations bdev_sops = {
493 .statfs = simple_statfs, 493 .statfs = simple_statfs,
494 .alloc_inode = bdev_alloc_inode, 494 .alloc_inode = bdev_alloc_inode,
495 .destroy_inode = bdev_destroy_inode, 495 .destroy_inode = bdev_destroy_inode,
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 481e84f5f361..e8287c4c6eb3 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -64,7 +64,7 @@ extern struct task_struct * oplockThread; /* remove sparse warning */
64struct task_struct * oplockThread = NULL; 64struct task_struct * oplockThread = NULL;
65extern struct task_struct * dnotifyThread; /* remove sparse warning */ 65extern struct task_struct * dnotifyThread; /* remove sparse warning */
66struct task_struct * dnotifyThread = NULL; 66struct task_struct * dnotifyThread = NULL;
67static struct super_operations cifs_super_ops; 67static const struct super_operations cifs_super_ops;
68unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; 68unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
69module_param(CIFSMaxBufSize, int, 0); 69module_param(CIFSMaxBufSize, int, 0);
70MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048"); 70MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048");
@@ -453,7 +453,7 @@ static int cifs_remount(struct super_block *sb, int *flags, char *data)
453 return 0; 453 return 0;
454} 454}
455 455
456static struct super_operations cifs_super_ops = { 456static const struct super_operations cifs_super_ops = {
457 .read_inode = cifs_read_inode, 457 .read_inode = cifs_read_inode,
458 .put_super = cifs_put_super, 458 .put_super = cifs_put_super,
459 .statfs = cifs_statfs, 459 .statfs = cifs_statfs,
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index ab9e20a863f3..01ae24af9cfd 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -36,7 +36,7 @@ extern const struct address_space_operations cifs_addr_ops;
36extern const struct address_space_operations cifs_addr_ops_smallbuf; 36extern const struct address_space_operations cifs_addr_ops_smallbuf;
37 37
38/* Functions related to super block operations */ 38/* Functions related to super block operations */
39/* extern struct super_operations cifs_super_ops;*/ 39/* extern const struct super_operations cifs_super_ops;*/
40extern void cifs_read_inode(struct inode *); 40extern void cifs_read_inode(struct inode *);
41extern void cifs_delete_inode(struct inode *); 41extern void cifs_delete_inode(struct inode *);
42/* extern void cifs_write_inode(struct inode *); *//* BB not needed yet */ 42/* extern void cifs_write_inode(struct inode *); *//* BB not needed yet */
diff --git a/fs/coda/inode.c b/fs/coda/inode.c
index 1562515efdb5..614175a3b02e 100644
--- a/fs/coda/inode.c
+++ b/fs/coda/inode.c
@@ -90,7 +90,7 @@ static int coda_remount(struct super_block *sb, int *flags, char *data)
90} 90}
91 91
92/* exported operations */ 92/* exported operations */
93static struct super_operations coda_super_operations = 93static const struct super_operations coda_super_operations =
94{ 94{
95 .alloc_inode = coda_alloc_inode, 95 .alloc_inode = coda_alloc_inode,
96 .destroy_inode = coda_destroy_inode, 96 .destroy_inode = coda_destroy_inode,
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c
index ed678529ebb2..6f573004cd7d 100644
--- a/fs/configfs/mount.c
+++ b/fs/configfs/mount.c
@@ -41,7 +41,7 @@ struct super_block * configfs_sb = NULL;
41struct kmem_cache *configfs_dir_cachep; 41struct kmem_cache *configfs_dir_cachep;
42static int configfs_mnt_count = 0; 42static int configfs_mnt_count = 0;
43 43
44static struct super_operations configfs_ops = { 44static const struct super_operations configfs_ops = {
45 .statfs = simple_statfs, 45 .statfs = simple_statfs,
46 .drop_inode = generic_delete_inode, 46 .drop_inode = generic_delete_inode,
47}; 47};
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index 0367d200a2de..facd0c89be8f 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -27,7 +27,7 @@
27 27
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29 29
30static struct super_operations cramfs_ops; 30static const struct super_operations cramfs_ops;
31static const struct inode_operations cramfs_dir_inode_operations; 31static const struct inode_operations cramfs_dir_inode_operations;
32static const struct file_operations cramfs_directory_operations; 32static const struct file_operations cramfs_directory_operations;
33static const struct address_space_operations cramfs_aops; 33static const struct address_space_operations cramfs_aops;
@@ -522,7 +522,7 @@ static const struct inode_operations cramfs_dir_inode_operations = {
522 .lookup = cramfs_lookup, 522 .lookup = cramfs_lookup,
523}; 523};
524 524
525static struct super_operations cramfs_ops = { 525static const struct super_operations cramfs_ops = {
526 .put_super = cramfs_put_super, 526 .put_super = cramfs_put_super,
527 .remount_fs = cramfs_remount, 527 .remount_fs = cramfs_remount,
528 .statfs = cramfs_statfs, 528 .statfs = cramfs_statfs,
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 5f7b5a6025bf..643e57b622bd 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -91,7 +91,7 @@ static int devpts_remount(struct super_block *sb, int *flags, char *data)
91 return 0; 91 return 0;
92} 92}
93 93
94static struct super_operations devpts_sops = { 94static const struct super_operations devpts_sops = {
95 .statfs = simple_statfs, 95 .statfs = simple_statfs,
96 .remount_fs = devpts_remount, 96 .remount_fs = devpts_remount,
97}; 97};
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index 275445d17162..b3609b7cdf11 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -449,7 +449,7 @@ extern const struct file_operations ecryptfs_dir_fops;
449extern const struct inode_operations ecryptfs_main_iops; 449extern const struct inode_operations ecryptfs_main_iops;
450extern const struct inode_operations ecryptfs_dir_iops; 450extern const struct inode_operations ecryptfs_dir_iops;
451extern const struct inode_operations ecryptfs_symlink_iops; 451extern const struct inode_operations ecryptfs_symlink_iops;
452extern struct super_operations ecryptfs_sops; 452extern const struct super_operations ecryptfs_sops;
453extern struct dentry_operations ecryptfs_dops; 453extern struct dentry_operations ecryptfs_dops;
454extern struct address_space_operations ecryptfs_aops; 454extern struct address_space_operations ecryptfs_aops;
455extern int ecryptfs_verbosity; 455extern int ecryptfs_verbosity;
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c
index eaa5daaf106e..7b3f0cc09a6f 100644
--- a/fs/ecryptfs/super.c
+++ b/fs/ecryptfs/super.c
@@ -168,7 +168,7 @@ out:
168 return rc; 168 return rc;
169} 169}
170 170
171struct super_operations ecryptfs_sops = { 171const struct super_operations ecryptfs_sops = {
172 .alloc_inode = ecryptfs_alloc_inode, 172 .alloc_inode = ecryptfs_alloc_inode,
173 .destroy_inode = ecryptfs_destroy_inode, 173 .destroy_inode = ecryptfs_destroy_inode,
174 .drop_inode = generic_delete_inode, 174 .drop_inode = generic_delete_inode,
diff --git a/fs/efs/super.c b/fs/efs/super.c
index dfebf21289f4..c2235e46edcd 100644
--- a/fs/efs/super.c
+++ b/fs/efs/super.c
@@ -105,7 +105,7 @@ static int efs_remount(struct super_block *sb, int *flags, char *data)
105 return 0; 105 return 0;
106} 106}
107 107
108static struct super_operations efs_superblock_operations = { 108static const struct super_operations efs_superblock_operations = {
109 .alloc_inode = efs_alloc_inode, 109 .alloc_inode = efs_alloc_inode,
110 .destroy_inode = efs_destroy_inode, 110 .destroy_inode = efs_destroy_inode,
111 .read_inode = efs_read_inode, 111 .read_inode = efs_read_inode,
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index daaa243eee9b..a046a419d8af 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -231,7 +231,7 @@ static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, siz
231static ssize_t ext2_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off); 231static ssize_t ext2_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off);
232#endif 232#endif
233 233
234static struct super_operations ext2_sops = { 234static const struct super_operations ext2_sops = {
235 .alloc_inode = ext2_alloc_inode, 235 .alloc_inode = ext2_alloc_inode,
236 .destroy_inode = ext2_destroy_inode, 236 .destroy_inode = ext2_destroy_inode,
237 .read_inode = ext2_read_inode, 237 .read_inode = ext2_read_inode,
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index a0623a84a4b2..4a4fcd6868c7 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -639,7 +639,7 @@ static struct quotactl_ops ext3_qctl_operations = {
639}; 639};
640#endif 640#endif
641 641
642static struct super_operations ext3_sops = { 642static const struct super_operations ext3_sops = {
643 .alloc_inode = ext3_alloc_inode, 643 .alloc_inode = ext3_alloc_inode,
644 .destroy_inode = ext3_destroy_inode, 644 .destroy_inode = ext3_destroy_inode,
645 .read_inode = ext3_read_inode, 645 .read_inode = ext3_read_inode,
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c63a18b574dd..61c4718e4a53 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -690,7 +690,7 @@ static struct quotactl_ops ext4_qctl_operations = {
690}; 690};
691#endif 691#endif
692 692
693static struct super_operations ext4_sops = { 693static const struct super_operations ext4_sops = {
694 .alloc_inode = ext4_alloc_inode, 694 .alloc_inode = ext4_alloc_inode,
695 .destroy_inode = ext4_destroy_inode, 695 .destroy_inode = ext4_destroy_inode,
696 .read_inode = ext4_read_inode, 696 .read_inode = ext4_read_inode,
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index f268fec6ed0a..761073544217 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -618,7 +618,7 @@ int fat_sync_inode(struct inode *inode)
618EXPORT_SYMBOL_GPL(fat_sync_inode); 618EXPORT_SYMBOL_GPL(fat_sync_inode);
619 619
620static int fat_show_options(struct seq_file *m, struct vfsmount *mnt); 620static int fat_show_options(struct seq_file *m, struct vfsmount *mnt);
621static struct super_operations fat_sops = { 621static const struct super_operations fat_sops = {
622 .alloc_inode = fat_alloc_inode, 622 .alloc_inode = fat_alloc_inode,
623 .destroy_inode = fat_destroy_inode, 623 .destroy_inode = fat_destroy_inode,
624 .write_inode = fat_write_inode, 624 .write_inode = fat_write_inode,
diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c
index ac28b0835ffc..647d600f0bc8 100644
--- a/fs/freevxfs/vxfs_super.c
+++ b/fs/freevxfs/vxfs_super.c
@@ -59,7 +59,7 @@ static void vxfs_put_super(struct super_block *);
59static int vxfs_statfs(struct dentry *, struct kstatfs *); 59static int vxfs_statfs(struct dentry *, struct kstatfs *);
60static int vxfs_remount(struct super_block *, int *, char *); 60static int vxfs_remount(struct super_block *, int *, char *);
61 61
62static struct super_operations vxfs_super_ops = { 62static const struct super_operations vxfs_super_ops = {
63 .read_inode = vxfs_read_inode, 63 .read_inode = vxfs_read_inode,
64 .clear_inode = vxfs_clear_inode, 64 .clear_inode = vxfs_clear_inode,
65 .put_super = vxfs_put_super, 65 .put_super = vxfs_put_super,
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 220255110d76..5ab8e50e7808 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -446,7 +446,7 @@ static struct inode *get_root_inode(struct super_block *sb, unsigned mode)
446 return fuse_iget(sb, 1, 0, &attr); 446 return fuse_iget(sb, 1, 0, &attr);
447} 447}
448 448
449static struct super_operations fuse_super_operations = { 449static const struct super_operations fuse_super_operations = {
450 .alloc_inode = fuse_alloc_inode, 450 .alloc_inode = fuse_alloc_inode,
451 .destroy_inode = fuse_destroy_inode, 451 .destroy_inode = fuse_destroy_inode,
452 .read_inode = fuse_read_inode, 452 .read_inode = fuse_read_inode,
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index 47369d011214..b89999d3a767 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -468,7 +468,7 @@ static void gfs2_destroy_inode(struct inode *inode)
468 kmem_cache_free(gfs2_inode_cachep, inode); 468 kmem_cache_free(gfs2_inode_cachep, inode);
469} 469}
470 470
471struct super_operations gfs2_super_ops = { 471const struct super_operations gfs2_super_ops = {
472 .alloc_inode = gfs2_alloc_inode, 472 .alloc_inode = gfs2_alloc_inode,
473 .destroy_inode = gfs2_destroy_inode, 473 .destroy_inode = gfs2_destroy_inode,
474 .write_inode = gfs2_write_inode, 474 .write_inode = gfs2_write_inode,
diff --git a/fs/gfs2/ops_super.h b/fs/gfs2/ops_super.h
index 9de73f042f78..442a274c6272 100644
--- a/fs/gfs2/ops_super.h
+++ b/fs/gfs2/ops_super.h
@@ -12,6 +12,6 @@
12 12
13#include <linux/fs.h> 13#include <linux/fs.h>
14 14
15extern struct super_operations gfs2_super_ops; 15extern const struct super_operations gfs2_super_ops;
16 16
17#endif /* __OPS_SUPER_DOT_H__ */ 17#endif /* __OPS_SUPER_DOT_H__ */
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index a36987966004..623f509f1d47 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -154,7 +154,7 @@ static void hfs_destroy_inode(struct inode *inode)
154 kmem_cache_free(hfs_inode_cachep, HFS_I(inode)); 154 kmem_cache_free(hfs_inode_cachep, HFS_I(inode));
155} 155}
156 156
157static struct super_operations hfs_super_operations = { 157static const struct super_operations hfs_super_operations = {
158 .alloc_inode = hfs_alloc_inode, 158 .alloc_inode = hfs_alloc_inode,
159 .destroy_inode = hfs_destroy_inode, 159 .destroy_inode = hfs_destroy_inode,
160 .write_inode = hfs_write_inode, 160 .write_inode = hfs_write_inode,
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 0f513c6bf843..5a282f64c637 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -260,7 +260,7 @@ static int hfsplus_remount(struct super_block *sb, int *flags, char *data)
260 return 0; 260 return 0;
261} 261}
262 262
263static struct super_operations hfsplus_sops = { 263static const struct super_operations hfsplus_sops = {
264 .alloc_inode = hfsplus_alloc_inode, 264 .alloc_inode = hfsplus_alloc_inode,
265 .destroy_inode = hfsplus_destroy_inode, 265 .destroy_inode = hfsplus_destroy_inode,
266 .read_inode = hfsplus_read_inode, 266 .read_inode = hfsplus_read_inode,
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index fec208db5e46..e965eb11d76f 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -309,7 +309,7 @@ static void hostfs_read_inode(struct inode *inode)
309 read_inode(inode); 309 read_inode(inode);
310} 310}
311 311
312static struct super_operations hostfs_sbops = { 312static const struct super_operations hostfs_sbops = {
313 .alloc_inode = hostfs_alloc_inode, 313 .alloc_inode = hostfs_alloc_inode,
314 .drop_inode = generic_delete_inode, 314 .drop_inode = generic_delete_inode,
315 .delete_inode = hostfs_delete_inode, 315 .delete_inode = hostfs_delete_inode,
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index d4abc1a1d566..e0174e338526 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -426,7 +426,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
426 426
427/* Super operations */ 427/* Super operations */
428 428
429static struct super_operations hpfs_sops = 429static const struct super_operations hpfs_sops =
430{ 430{
431 .alloc_inode = hpfs_alloc_inode, 431 .alloc_inode = hpfs_alloc_inode,
432 .destroy_inode = hpfs_destroy_inode, 432 .destroy_inode = hpfs_destroy_inode,
diff --git a/fs/hppfs/hppfs_kern.c b/fs/hppfs/hppfs_kern.c
index bd7116816314..affb7412125e 100644
--- a/fs/hppfs/hppfs_kern.c
+++ b/fs/hppfs/hppfs_kern.c
@@ -43,7 +43,7 @@ static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode)
43 43
44#define HPPFS_SUPER_MAGIC 0xb00000ee 44#define HPPFS_SUPER_MAGIC 0xb00000ee
45 45
46static struct super_operations hppfs_sbops; 46static const struct super_operations hppfs_sbops;
47 47
48static int is_pid(struct dentry *dentry) 48static int is_pid(struct dentry *dentry)
49{ 49{
@@ -649,7 +649,7 @@ static void hppfs_destroy_inode(struct inode *inode)
649 kfree(HPPFS_I(inode)); 649 kfree(HPPFS_I(inode));
650} 650}
651 651
652static struct super_operations hppfs_sbops = { 652static const struct super_operations hppfs_sbops = {
653 .alloc_inode = hppfs_alloc_inode, 653 .alloc_inode = hppfs_alloc_inode,
654 .destroy_inode = hppfs_destroy_inode, 654 .destroy_inode = hppfs_destroy_inode,
655 .read_inode = hppfs_read_inode, 655 .read_inode = hppfs_read_inode,
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 26ba81fc7fab..8c718a3d413f 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -33,7 +33,7 @@
33/* some random number */ 33/* some random number */
34#define HUGETLBFS_MAGIC 0x958458f6 34#define HUGETLBFS_MAGIC 0x958458f6
35 35
36static struct super_operations hugetlbfs_ops; 36static const struct super_operations hugetlbfs_ops;
37static const struct address_space_operations hugetlbfs_aops; 37static const struct address_space_operations hugetlbfs_aops;
38const struct file_operations hugetlbfs_file_operations; 38const struct file_operations hugetlbfs_file_operations;
39static const struct inode_operations hugetlbfs_dir_inode_operations; 39static const struct inode_operations hugetlbfs_dir_inode_operations;
@@ -580,7 +580,7 @@ static const struct inode_operations hugetlbfs_inode_operations = {
580 .setattr = hugetlbfs_setattr, 580 .setattr = hugetlbfs_setattr,
581}; 581};
582 582
583static struct super_operations hugetlbfs_ops = { 583static const struct super_operations hugetlbfs_ops = {
584 .alloc_inode = hugetlbfs_alloc_inode, 584 .alloc_inode = hugetlbfs_alloc_inode,
585 .destroy_inode = hugetlbfs_destroy_inode, 585 .destroy_inode = hugetlbfs_destroy_inode,
586 .statfs = hugetlbfs_statfs, 586 .statfs = hugetlbfs_statfs,
diff --git a/fs/inode.c b/fs/inode.c
index 5e32432a7608..5abb097ab1b0 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1000,7 +1000,7 @@ EXPORT_SYMBOL(remove_inode_hash);
1000 */ 1000 */
1001void generic_delete_inode(struct inode *inode) 1001void generic_delete_inode(struct inode *inode)
1002{ 1002{
1003 struct super_operations *op = inode->i_sb->s_op; 1003 const struct super_operations *op = inode->i_sb->s_op;
1004 1004
1005 list_del_init(&inode->i_list); 1005 list_del_init(&inode->i_list);
1006 list_del_init(&inode->i_sb_list); 1006 list_del_init(&inode->i_sb_list);
@@ -1093,7 +1093,7 @@ EXPORT_SYMBOL_GPL(generic_drop_inode);
1093 */ 1093 */
1094static inline void iput_final(struct inode *inode) 1094static inline void iput_final(struct inode *inode)
1095{ 1095{
1096 struct super_operations *op = inode->i_sb->s_op; 1096 const struct super_operations *op = inode->i_sb->s_op;
1097 void (*drop)(struct inode *) = generic_drop_inode; 1097 void (*drop)(struct inode *) = generic_drop_inode;
1098 1098
1099 if (op && op->drop_inode) 1099 if (op && op->drop_inode)
@@ -1113,7 +1113,7 @@ static inline void iput_final(struct inode *inode)
1113void iput(struct inode *inode) 1113void iput(struct inode *inode)
1114{ 1114{
1115 if (inode) { 1115 if (inode) {
1116 struct super_operations *op = inode->i_sb->s_op; 1116 const struct super_operations *op = inode->i_sb->s_op;
1117 1117
1118 BUG_ON(inode->i_state == I_CLEAR); 1118 BUG_ON(inode->i_state == I_CLEAR);
1119 1119
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index ea55b6c469ec..64a96cdfe3a4 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -106,7 +106,7 @@ static int isofs_remount(struct super_block *sb, int *flags, char *data)
106 return 0; 106 return 0;
107} 107}
108 108
109static struct super_operations isofs_sops = { 109static const struct super_operations isofs_sops = {
110 .alloc_inode = isofs_alloc_inode, 110 .alloc_inode = isofs_alloc_inode,
111 .destroy_inode = isofs_destroy_inode, 111 .destroy_inode = isofs_destroy_inode,
112 .read_inode = isofs_read_inode, 112 .read_inode = isofs_read_inode,
diff --git a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c
index fe3347defe6c..9602b925da08 100644
--- a/fs/jffs/inode-v23.c
+++ b/fs/jffs/inode-v23.c
@@ -54,7 +54,7 @@
54 54
55static int jffs_remove(struct inode *dir, struct dentry *dentry, int type); 55static int jffs_remove(struct inode *dir, struct dentry *dentry, int type);
56 56
57static struct super_operations jffs_ops; 57static const struct super_operations jffs_ops;
58static const struct file_operations jffs_file_operations; 58static const struct file_operations jffs_file_operations;
59static const struct inode_operations jffs_file_inode_operations; 59static const struct inode_operations jffs_file_inode_operations;
60static const struct file_operations jffs_dir_operations; 60static const struct file_operations jffs_dir_operations;
@@ -1774,7 +1774,7 @@ static int jffs_remount(struct super_block *sb, int *flags, char *data)
1774 return 0; 1774 return 0;
1775} 1775}
1776 1776
1777static struct super_operations jffs_ops = 1777static const struct super_operations jffs_ops =
1778{ 1778{
1779 .read_inode = jffs_read_inode, 1779 .read_inode = jffs_read_inode,
1780 .delete_inode = jffs_delete_inode, 1780 .delete_inode = jffs_delete_inode,
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 08a0e6c49e61..cc7e8e71ad46 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -66,7 +66,7 @@ static int jffs2_sync_fs(struct super_block *sb, int wait)
66 return 0; 66 return 0;
67} 67}
68 68
69static struct super_operations jffs2_super_operations = 69static const struct super_operations jffs2_super_operations =
70{ 70{
71 .alloc_inode = jffs2_alloc_inode, 71 .alloc_inode = jffs2_alloc_inode,
72 .destroy_inode =jffs2_destroy_inode, 72 .destroy_inode =jffs2_destroy_inode,
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 846ac8f34513..52d73d54a931 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -46,7 +46,7 @@ MODULE_LICENSE("GPL");
46 46
47static struct kmem_cache * jfs_inode_cachep; 47static struct kmem_cache * jfs_inode_cachep;
48 48
49static struct super_operations jfs_super_operations; 49static const struct super_operations jfs_super_operations;
50static struct export_operations jfs_export_operations; 50static struct export_operations jfs_export_operations;
51static struct file_system_type jfs_fs_type; 51static struct file_system_type jfs_fs_type;
52 52
@@ -716,7 +716,7 @@ out:
716 716
717#endif 717#endif
718 718
719static struct super_operations jfs_super_operations = { 719static const struct super_operations jfs_super_operations = {
720 .alloc_inode = jfs_alloc_inode, 720 .alloc_inode = jfs_alloc_inode,
721 .destroy_inode = jfs_destroy_inode, 721 .destroy_inode = jfs_destroy_inode,
722 .read_inode = jfs_read_inode, 722 .read_inode = jfs_read_inode,
diff --git a/fs/libfs.c b/fs/libfs.c
index 0f4ee02e0b16..7d487047dbb8 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -195,11 +195,11 @@ const struct inode_operations simple_dir_inode_operations = {
195 * will never be mountable) 195 * will never be mountable)
196 */ 196 */
197int get_sb_pseudo(struct file_system_type *fs_type, char *name, 197int get_sb_pseudo(struct file_system_type *fs_type, char *name,
198 struct super_operations *ops, unsigned long magic, 198 const struct super_operations *ops, unsigned long magic,
199 struct vfsmount *mnt) 199 struct vfsmount *mnt)
200{ 200{
201 struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL); 201 struct super_block *s = sget(fs_type, NULL, set_anon_super, NULL);
202 static struct super_operations default_ops = {.statfs = simple_statfs}; 202 static const struct super_operations default_ops = {.statfs = simple_statfs};
203 struct dentry *dentry; 203 struct dentry *dentry;
204 struct inode *root; 204 struct inode *root;
205 struct qstr d_name = {.name = name, .len = strlen(name)}; 205 struct qstr d_name = {.name = name, .len = strlen(name)};
diff --git a/fs/minix/inode.c b/fs/minix/inode.c
index e56822bff948..92e383af3709 100644
--- a/fs/minix/inode.c
+++ b/fs/minix/inode.c
@@ -95,7 +95,7 @@ static void destroy_inodecache(void)
95 kmem_cache_destroy(minix_inode_cachep); 95 kmem_cache_destroy(minix_inode_cachep);
96} 96}
97 97
98static struct super_operations minix_sops = { 98static const struct super_operations minix_sops = {
99 .alloc_inode = minix_alloc_inode, 99 .alloc_inode = minix_alloc_inode,
100 .destroy_inode = minix_destroy_inode, 100 .destroy_inode = minix_destroy_inode,
101 .read_inode = minix_read_inode, 101 .read_inode = minix_read_inode,
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 730433f3d237..14939ddf74f1 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -90,7 +90,7 @@ static int ncp_remount(struct super_block *sb, int *flags, char* data)
90 return 0; 90 return 0;
91} 91}
92 92
93static struct super_operations ncp_sops = 93static const struct super_operations ncp_sops =
94{ 94{
95 .alloc_inode = ncp_alloc_inode, 95 .alloc_inode = ncp_alloc_inode,
96 .destroy_inode = ncp_destroy_inode, 96 .destroy_inode = ncp_destroy_inode,
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 76b980097621..baa28860ad27 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -82,7 +82,7 @@ struct file_system_type nfs_xdev_fs_type = {
82 .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, 82 .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA,
83}; 83};
84 84
85static struct super_operations nfs_sops = { 85static const struct super_operations nfs_sops = {
86 .alloc_inode = nfs_alloc_inode, 86 .alloc_inode = nfs_alloc_inode,
87 .destroy_inode = nfs_destroy_inode, 87 .destroy_inode = nfs_destroy_inode,
88 .write_inode = nfs_write_inode, 88 .write_inode = nfs_write_inode,
@@ -126,7 +126,7 @@ struct file_system_type nfs4_referral_fs_type = {
126 .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, 126 .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA,
127}; 127};
128 128
129static struct super_operations nfs4_sops = { 129static const struct super_operations nfs4_sops = {
130 .alloc_inode = nfs_alloc_inode, 130 .alloc_inode = nfs_alloc_inode,
131 .destroy_inode = nfs_destroy_inode, 131 .destroy_inode = nfs_destroy_inode,
132 .write_inode = nfs_write_inode, 132 .write_inode = nfs_write_inode,
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c
index babf94d90def..1594c90b7164 100644
--- a/fs/ntfs/super.c
+++ b/fs/ntfs/super.c
@@ -2699,7 +2699,7 @@ static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs)
2699/** 2699/**
2700 * The complete super operations. 2700 * The complete super operations.
2701 */ 2701 */
2702static struct super_operations ntfs_sops = { 2702static const struct super_operations ntfs_sops = {
2703 .alloc_inode = ntfs_alloc_big_inode, /* VFS: Allocate new inode. */ 2703 .alloc_inode = ntfs_alloc_big_inode, /* VFS: Allocate new inode. */
2704 .destroy_inode = ntfs_destroy_big_inode, /* VFS: Deallocate inode. */ 2704 .destroy_inode = ntfs_destroy_big_inode, /* VFS: Deallocate inode. */
2705#ifdef NTFS_RW 2705#ifdef NTFS_RW
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c
index 84b33ffb42f1..de952eba29a9 100644
--- a/fs/ocfs2/dlm/dlmfs.c
+++ b/fs/ocfs2/dlm/dlmfs.c
@@ -61,7 +61,7 @@
61#define MLOG_MASK_PREFIX ML_DLMFS 61#define MLOG_MASK_PREFIX ML_DLMFS
62#include "cluster/masklog.h" 62#include "cluster/masklog.h"
63 63
64static struct super_operations dlmfs_ops; 64static const struct super_operations dlmfs_ops;
65static const struct file_operations dlmfs_file_operations; 65static const struct file_operations dlmfs_file_operations;
66static const struct inode_operations dlmfs_dir_inode_operations; 66static const struct inode_operations dlmfs_dir_inode_operations;
67static const struct inode_operations dlmfs_root_inode_operations; 67static const struct inode_operations dlmfs_root_inode_operations;
@@ -560,7 +560,7 @@ static const struct inode_operations dlmfs_root_inode_operations = {
560 .rmdir = simple_rmdir, 560 .rmdir = simple_rmdir,
561}; 561};
562 562
563static struct super_operations dlmfs_ops = { 563static const struct super_operations dlmfs_ops = {
564 .statfs = simple_statfs, 564 .statfs = simple_statfs,
565 .alloc_inode = dlmfs_alloc_inode, 565 .alloc_inode = dlmfs_alloc_inode,
566 .destroy_inode = dlmfs_destroy_inode, 566 .destroy_inode = dlmfs_destroy_inode,
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 6e300a88a47e..6534f92424dd 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -116,7 +116,7 @@ static void ocfs2_destroy_inode(struct inode *inode);
116 116
117static unsigned long long ocfs2_max_file_offset(unsigned int blockshift); 117static unsigned long long ocfs2_max_file_offset(unsigned int blockshift);
118 118
119static struct super_operations ocfs2_sops = { 119static const struct super_operations ocfs2_sops = {
120 .statfs = ocfs2_statfs, 120 .statfs = ocfs2_statfs,
121 .alloc_inode = ocfs2_alloc_inode, 121 .alloc_inode = ocfs2_alloc_inode,
122 .destroy_inode = ocfs2_destroy_inode, 122 .destroy_inode = ocfs2_destroy_inode,
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index 327807b86fa1..bde1c164417d 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -364,7 +364,7 @@ static int openprom_remount(struct super_block *sb, int *flags, char *data)
364 return 0; 364 return 0;
365} 365}
366 366
367static struct super_operations openprom_sops = { 367static const struct super_operations openprom_sops = {
368 .alloc_inode = openprom_alloc_inode, 368 .alloc_inode = openprom_alloc_inode,
369 .destroy_inode = openprom_destroy_inode, 369 .destroy_inode = openprom_destroy_inode,
370 .read_inode = openprom_read_inode, 370 .read_inode = openprom_read_inode,
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index e26945ba685b..f6722be37dde 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -132,7 +132,7 @@ static int proc_remount(struct super_block *sb, int *flags, char *data)
132 return 0; 132 return 0;
133} 133}
134 134
135static struct super_operations proc_sops = { 135static const struct super_operations proc_sops = {
136 .alloc_inode = proc_alloc_inode, 136 .alloc_inode = proc_alloc_inode,
137 .destroy_inode = proc_destroy_inode, 137 .destroy_inode = proc_destroy_inode,
138 .read_inode = proc_read_inode, 138 .read_inode = proc_read_inode,
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index c047dc654d5c..83bc8e7824cd 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -30,7 +30,7 @@
30#define QNX4_VERSION 4 30#define QNX4_VERSION 4
31#define QNX4_BMNAME ".bitmap" 31#define QNX4_BMNAME ".bitmap"
32 32
33static struct super_operations qnx4_sops; 33static const struct super_operations qnx4_sops;
34 34
35#ifdef CONFIG_QNX4FS_RW 35#ifdef CONFIG_QNX4FS_RW
36 36
@@ -129,7 +129,7 @@ static void qnx4_read_inode(struct inode *);
129static int qnx4_remount(struct super_block *sb, int *flags, char *data); 129static int qnx4_remount(struct super_block *sb, int *flags, char *data);
130static int qnx4_statfs(struct dentry *, struct kstatfs *); 130static int qnx4_statfs(struct dentry *, struct kstatfs *);
131 131
132static struct super_operations qnx4_sops = 132static const struct super_operations qnx4_sops =
133{ 133{
134 .alloc_inode = qnx4_alloc_inode, 134 .alloc_inode = qnx4_alloc_inode,
135 .destroy_inode = qnx4_destroy_inode, 135 .destroy_inode = qnx4_destroy_inode,
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index 7a96b1d662a2..ff1f7639707b 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -40,7 +40,7 @@
40/* some random number */ 40/* some random number */
41#define RAMFS_MAGIC 0x858458f6 41#define RAMFS_MAGIC 0x858458f6
42 42
43static struct super_operations ramfs_ops; 43static const struct super_operations ramfs_ops;
44static const struct inode_operations ramfs_dir_inode_operations; 44static const struct inode_operations ramfs_dir_inode_operations;
45 45
46static struct backing_dev_info ramfs_backing_dev_info = { 46static struct backing_dev_info ramfs_backing_dev_info = {
@@ -155,7 +155,7 @@ static const struct inode_operations ramfs_dir_inode_operations = {
155 .rename = simple_rename, 155 .rename = simple_rename,
156}; 156};
157 157
158static struct super_operations ramfs_ops = { 158static const struct super_operations ramfs_ops = {
159 .statfs = simple_statfs, 159 .statfs = simple_statfs,
160 .drop_inode = generic_delete_inode, 160 .drop_inode = generic_delete_inode,
161}; 161};
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 58ad4551a7c1..f13a7f164dc6 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -593,7 +593,7 @@ static ssize_t reiserfs_quota_read(struct super_block *, int, char *, size_t,
593 loff_t); 593 loff_t);
594#endif 594#endif
595 595
596static struct super_operations reiserfs_sops = { 596static const struct super_operations reiserfs_sops = {
597 .alloc_inode = reiserfs_alloc_inode, 597 .alloc_inode = reiserfs_alloc_inode,
598 .destroy_inode = reiserfs_destroy_inode, 598 .destroy_inode = reiserfs_destroy_inode,
599 .write_inode = reiserfs_write_inode, 599 .write_inode = reiserfs_write_inode,
diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c
index 1e712cc1693b..fd601014813e 100644
--- a/fs/romfs/inode.c
+++ b/fs/romfs/inode.c
@@ -110,7 +110,7 @@ romfs_checksum(void *data, int size)
110 return sum; 110 return sum;
111} 111}
112 112
113static struct super_operations romfs_ops; 113static const struct super_operations romfs_ops;
114 114
115static int romfs_fill_super(struct super_block *s, void *data, int silent) 115static int romfs_fill_super(struct super_block *s, void *data, int silent)
116{ 116{
@@ -598,7 +598,7 @@ static int romfs_remount(struct super_block *sb, int *flags, char *data)
598 return 0; 598 return 0;
599} 599}
600 600
601static struct super_operations romfs_ops = { 601static const struct super_operations romfs_ops = {
602 .alloc_inode = romfs_alloc_inode, 602 .alloc_inode = romfs_alloc_inode,
603 .destroy_inode = romfs_destroy_inode, 603 .destroy_inode = romfs_destroy_inode,
604 .read_inode = romfs_read_inode, 604 .read_inode = romfs_read_inode,
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c
index 84dfe3f3482e..5faba4f1c9ab 100644
--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -98,7 +98,7 @@ static int smb_remount(struct super_block *sb, int *flags, char *data)
98 return 0; 98 return 0;
99} 99}
100 100
101static struct super_operations smb_sops = 101static const struct super_operations smb_sops =
102{ 102{
103 .alloc_inode = smb_alloc_inode, 103 .alloc_inode = smb_alloc_inode,
104 .destroy_inode = smb_destroy_inode, 104 .destroy_inode = smb_destroy_inode,
diff --git a/fs/super.c b/fs/super.c
index 3e7458c2bb76..60b1e50cbf53 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -285,7 +285,7 @@ int fsync_super(struct super_block *sb)
285 */ 285 */
286void generic_shutdown_super(struct super_block *sb) 286void generic_shutdown_super(struct super_block *sb)
287{ 287{
288 struct super_operations *sop = sb->s_op; 288 const struct super_operations *sop = sb->s_op;
289 289
290 if (sb->s_root) { 290 if (sb->s_root) {
291 shrink_dcache_for_umount(sb); 291 shrink_dcache_for_umount(sb);
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index f6a87a824883..23a48a38e6af 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -21,7 +21,7 @@ struct kmem_cache *sysfs_dir_cachep;
21 21
22static void sysfs_clear_inode(struct inode *inode); 22static void sysfs_clear_inode(struct inode *inode);
23 23
24static struct super_operations sysfs_ops = { 24static const struct super_operations sysfs_ops = {
25 .statfs = simple_statfs, 25 .statfs = simple_statfs,
26 .drop_inode = sysfs_delete_inode, 26 .drop_inode = sysfs_delete_inode,
27 .clear_inode = sysfs_clear_inode, 27 .clear_inode = sysfs_clear_inode,
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c
index 13dd75c4bc85..9311cac186fe 100644
--- a/fs/sysv/inode.c
+++ b/fs/sysv/inode.c
@@ -327,7 +327,7 @@ static void init_once(void *p, struct kmem_cache *cachep, unsigned long flags)
327 inode_init_once(&si->vfs_inode); 327 inode_init_once(&si->vfs_inode);
328} 328}
329 329
330struct super_operations sysv_sops = { 330const struct super_operations sysv_sops = {
331 .alloc_inode = sysv_alloc_inode, 331 .alloc_inode = sysv_alloc_inode,
332 .destroy_inode = sysv_destroy_inode, 332 .destroy_inode = sysv_destroy_inode,
333 .read_inode = sysv_read_inode, 333 .read_inode = sysv_read_inode,
diff --git a/fs/sysv/sysv.h b/fs/sysv/sysv.h
index a320edcf541e..5b4fedf17cc4 100644
--- a/fs/sysv/sysv.h
+++ b/fs/sysv/sysv.h
@@ -165,7 +165,7 @@ extern const struct inode_operations sysv_fast_symlink_inode_operations;
165extern const struct file_operations sysv_file_operations; 165extern const struct file_operations sysv_file_operations;
166extern const struct file_operations sysv_dir_operations; 166extern const struct file_operations sysv_dir_operations;
167extern const struct address_space_operations sysv_aops; 167extern const struct address_space_operations sysv_aops;
168extern struct super_operations sysv_sops; 168extern const struct super_operations sysv_sops;
169extern struct dentry_operations sysv_dentry_operations; 169extern struct dentry_operations sysv_dentry_operations;
170 170
171 171
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 1dbc2955f02e..8672b88f7ff2 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -160,7 +160,7 @@ static void destroy_inodecache(void)
160} 160}
161 161
162/* Superblock operations */ 162/* Superblock operations */
163static struct super_operations udf_sb_ops = { 163static const struct super_operations udf_sb_ops = {
164 .alloc_inode = udf_alloc_inode, 164 .alloc_inode = udf_alloc_inode,
165 .destroy_inode = udf_destroy_inode, 165 .destroy_inode = udf_destroy_inode,
166 .write_inode = udf_write_inode, 166 .write_inode = udf_write_inode,
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index cf74548aa85a..b5a6461ec66b 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -213,7 +213,7 @@ static void ufs_print_cylinder_stuff(struct super_block *sb,
213# define ufs_print_cylinder_stuff(sb, cg) /**/ 213# define ufs_print_cylinder_stuff(sb, cg) /**/
214#endif /* CONFIG_UFS_DEBUG */ 214#endif /* CONFIG_UFS_DEBUG */
215 215
216static struct super_operations ufs_super_ops; 216static const struct super_operations ufs_super_ops;
217 217
218static char error_buf[1024]; 218static char error_buf[1024];
219 219
@@ -1264,7 +1264,7 @@ static ssize_t ufs_quota_read(struct super_block *, int, char *,size_t, loff_t);
1264static ssize_t ufs_quota_write(struct super_block *, int, const char *, size_t, loff_t); 1264static ssize_t ufs_quota_write(struct super_block *, int, const char *, size_t, loff_t);
1265#endif 1265#endif
1266 1266
1267static struct super_operations ufs_super_ops = { 1267static const struct super_operations ufs_super_ops = {
1268 .alloc_inode = ufs_alloc_inode, 1268 .alloc_inode = ufs_alloc_inode,
1269 .destroy_inode = ufs_destroy_inode, 1269 .destroy_inode = ufs_destroy_inode,
1270 .read_inode = ufs_read_inode, 1270 .read_inode = ufs_read_inode,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index bab891bb2270..86ec3f4a7da6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -907,7 +907,7 @@ struct super_block {
907 unsigned char s_dirt; 907 unsigned char s_dirt;
908 unsigned long long s_maxbytes; /* Max file size */ 908 unsigned long long s_maxbytes; /* Max file size */
909 struct file_system_type *s_type; 909 struct file_system_type *s_type;
910 struct super_operations *s_op; 910 const struct super_operations *s_op;
911 struct dquot_operations *dq_op; 911 struct dquot_operations *dq_op;
912 struct quotactl_ops *s_qcop; 912 struct quotactl_ops *s_qcop;
913 struct export_operations *s_export_op; 913 struct export_operations *s_export_op;
@@ -1383,7 +1383,7 @@ struct super_block *sget(struct file_system_type *type,
1383 int (*set)(struct super_block *,void *), 1383 int (*set)(struct super_block *,void *),
1384 void *data); 1384 void *data);
1385extern int get_sb_pseudo(struct file_system_type *, char *, 1385extern int get_sb_pseudo(struct file_system_type *, char *,
1386 struct super_operations *ops, unsigned long, 1386 const struct super_operations *ops, unsigned long,
1387 struct vfsmount *mnt); 1387 struct vfsmount *mnt);
1388extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); 1388extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
1389int __put_super(struct super_block *sb); 1389int __put_super(struct super_block *sb);