diff options
| author | Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu> | 2007-02-12 03:55:41 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:47 -0500 |
| commit | ee9b6d61a2a43c5952eb43283f8db284a4e70b8a (patch) | |
| tree | afb0340e79d3e9d14f39df20e165ce2efe941b18 | |
| parent | c5ef1c42c51b1b5b4a401a6517bdda30933ddbaf (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>
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 | ||
| 47 | static void v9fs_clear_inode(struct inode *); | 47 | static void v9fs_clear_inode(struct inode *); |
| 48 | static struct super_operations v9fs_super_ops; | 48 | static 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 | ||
| 266 | static struct super_operations v9fs_super_ops = { | 266 | static 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 | ||
| 257 | static struct super_operations adfs_sops = { | 257 | static 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 | ||
| 115 | static struct super_operations affs_sops = { | 115 | static 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 | ||
| 59 | static struct super_operations afs_super_ops = { | 59 | static 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 | ||
| 53 | static void autofs_read_inode(struct inode *inode); | 53 | static void autofs_read_inode(struct inode *inode); |
| 54 | 54 | ||
| 55 | static struct super_operations autofs_sops = { | 55 | static 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 | ||
| 199 | static struct super_operations autofs4_sops = { | 199 | static 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 | ||
| 273 | static struct super_operations bfs_sops = { | 273 | static 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 | ||
