Commit b87221de6a4934eda856475a0065688d12973a04
Committed by
Linus Torvalds
1 parent
0d54b217a2
Exists in
master
and in
39 other branches
const: mark remaining super_operations const
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 18 changed files with 23 additions and 24 deletions Side-by-side Diff
- arch/powerpc/platforms/cell/spufs/inode.c
- arch/s390/hypfs/inode.c
- drivers/isdn/capi/capifs.c
- drivers/misc/ibmasm/ibmasmfs.c
- drivers/oprofile/oprofilefs.c
- drivers/usb/core/inode.c
- drivers/usb/gadget/inode.c
- fs/befs/linuxvfs.c
- fs/btrfs/super.c
- fs/nilfs2/super.c
- fs/omfs/inode.c
- fs/squashfs/super.c
- fs/super.c
- fs/xfs/linux-2.6/xfs_super.c
- ipc/mqueue.c
- kernel/cgroup.c
- net/socket.c
- net/sunrpc/rpc_pipe.c
arch/powerpc/platforms/cell/spufs/inode.c
... | ... | @@ -773,7 +773,7 @@ |
773 | 773 | spufs_fill_super(struct super_block *sb, void *data, int silent) |
774 | 774 | { |
775 | 775 | struct spufs_sb_info *info; |
776 | - static struct super_operations s_ops = { | |
776 | + static const struct super_operations s_ops = { | |
777 | 777 | .alloc_inode = spufs_alloc_inode, |
778 | 778 | .destroy_inode = spufs_destroy_inode, |
779 | 779 | .statfs = simple_statfs, |
arch/s390/hypfs/inode.c
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | |
42 | 42 | static const struct file_operations hypfs_file_ops; |
43 | 43 | static struct file_system_type hypfs_type; |
44 | -static struct super_operations hypfs_s_ops; | |
44 | +static const struct super_operations hypfs_s_ops; | |
45 | 45 | |
46 | 46 | /* start of list of all dentries, which have to be deleted on update */ |
47 | 47 | static struct dentry *hypfs_last_dentry; |
... | ... | @@ -472,7 +472,7 @@ |
472 | 472 | .kill_sb = hypfs_kill_super |
473 | 473 | }; |
474 | 474 | |
475 | -static struct super_operations hypfs_s_ops = { | |
475 | +static const struct super_operations hypfs_s_ops = { | |
476 | 476 | .statfs = simple_statfs, |
477 | 477 | .drop_inode = hypfs_drop_inode, |
478 | 478 | .show_options = hypfs_show_options, |
drivers/isdn/capi/capifs.c
drivers/misc/ibmasm/ibmasmfs.c
... | ... | @@ -97,7 +97,7 @@ |
97 | 97 | return get_sb_single(fst, flags, data, ibmasmfs_fill_super, mnt); |
98 | 98 | } |
99 | 99 | |
100 | -static struct super_operations ibmasmfs_s_ops = { | |
100 | +static const struct super_operations ibmasmfs_s_ops = { | |
101 | 101 | .statfs = simple_statfs, |
102 | 102 | .drop_inode = generic_delete_inode, |
103 | 103 | }; |
drivers/oprofile/oprofilefs.c
drivers/usb/core/inode.c
... | ... | @@ -48,7 +48,6 @@ |
48 | 48 | #define USBFS_DEFAULT_BUSMODE (S_IXUGO | S_IRUGO) |
49 | 49 | #define USBFS_DEFAULT_LISTMODE S_IRUGO |
50 | 50 | |
51 | -static struct super_operations usbfs_ops; | |
52 | 51 | static const struct file_operations default_file_operations; |
53 | 52 | static struct vfsmount *usbfs_mount; |
54 | 53 | static int usbfs_mount_count; /* = 0 */ |
... | ... | @@ -449,7 +448,7 @@ |
449 | 448 | .llseek = default_file_lseek, |
450 | 449 | }; |
451 | 450 | |
452 | -static struct super_operations usbfs_ops = { | |
451 | +static const struct super_operations usbfs_ops = { | |
453 | 452 | .statfs = simple_statfs, |
454 | 453 | .drop_inode = generic_delete_inode, |
455 | 454 | .remount_fs = remount, |
drivers/usb/gadget/inode.c
fs/befs/linuxvfs.c
... | ... | @@ -842,7 +842,7 @@ |
842 | 842 | sb->s_magic = BEFS_SUPER_MAGIC; |
843 | 843 | /* Set real blocksize of fs */ |
844 | 844 | sb_set_blocksize(sb, (ulong) befs_sb->block_size); |
845 | - sb->s_op = (struct super_operations *) &befs_sops; | |
845 | + sb->s_op = &befs_sops; | |
846 | 846 | root = befs_iget(sb, iaddr2blockno(sb, &(befs_sb->root_dir))); |
847 | 847 | if (IS_ERR(root)) { |
848 | 848 | ret = PTR_ERR(root); |
fs/btrfs/super.c
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | #include "export.h" |
52 | 52 | #include "compression.h" |
53 | 53 | |
54 | -static struct super_operations btrfs_super_ops; | |
54 | +static const struct super_operations btrfs_super_ops; | |
55 | 55 | |
56 | 56 | static void btrfs_put_super(struct super_block *sb) |
57 | 57 | { |
... | ... | @@ -675,7 +675,7 @@ |
675 | 675 | return 0; |
676 | 676 | } |
677 | 677 | |
678 | -static struct super_operations btrfs_super_ops = { | |
678 | +static const struct super_operations btrfs_super_ops = { | |
679 | 679 | .delete_inode = btrfs_delete_inode, |
680 | 680 | .put_super = btrfs_put_super, |
681 | 681 | .sync_fs = btrfs_sync_fs, |
fs/nilfs2/super.c
... | ... | @@ -504,7 +504,7 @@ |
504 | 504 | return 0; |
505 | 505 | } |
506 | 506 | |
507 | -static struct super_operations nilfs_sops = { | |
507 | +static const struct super_operations nilfs_sops = { | |
508 | 508 | .alloc_inode = nilfs_alloc_inode, |
509 | 509 | .destroy_inode = nilfs_destroy_inode, |
510 | 510 | .dirty_inode = nilfs_dirty_inode, |
fs/omfs/inode.c
fs/squashfs/super.c
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | #include "squashfs.h" |
45 | 45 | |
46 | 46 | static struct file_system_type squashfs_fs_type; |
47 | -static struct super_operations squashfs_super_ops; | |
47 | +static const struct super_operations squashfs_super_ops; | |
48 | 48 | |
49 | 49 | static int supported_squashfs_filesystem(short major, short minor, short comp) |
50 | 50 | { |
... | ... | @@ -444,7 +444,7 @@ |
444 | 444 | .fs_flags = FS_REQUIRES_DEV |
445 | 445 | }; |
446 | 446 | |
447 | -static struct super_operations squashfs_super_ops = { | |
447 | +static const struct super_operations squashfs_super_ops = { | |
448 | 448 | .alloc_inode = squashfs_alloc_inode, |
449 | 449 | .destroy_inode = squashfs_destroy_inode, |
450 | 450 | .statfs = squashfs_statfs, |
fs/super.c
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 | static struct super_block *alloc_super(struct file_system_type *type) |
55 | 55 | { |
56 | 56 | struct super_block *s = kzalloc(sizeof(struct super_block), GFP_USER); |
57 | - static struct super_operations default_op; | |
57 | + static const struct super_operations default_op; | |
58 | 58 | |
59 | 59 | if (s) { |
60 | 60 | if (security_sb_alloc(s)) { |
fs/xfs/linux-2.6/xfs_super.c
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | #include <linux/freezer.h> |
68 | 68 | #include <linux/parser.h> |
69 | 69 | |
70 | -static struct super_operations xfs_super_operations; | |
70 | +static const struct super_operations xfs_super_operations; | |
71 | 71 | static kmem_zone_t *xfs_ioend_zone; |
72 | 72 | mempool_t *xfs_ioend_pool; |
73 | 73 | |
... | ... | @@ -1536,7 +1536,7 @@ |
1536 | 1536 | mnt); |
1537 | 1537 | } |
1538 | 1538 | |
1539 | -static struct super_operations xfs_super_operations = { | |
1539 | +static const struct super_operations xfs_super_operations = { | |
1540 | 1540 | .alloc_inode = xfs_fs_alloc_inode, |
1541 | 1541 | .destroy_inode = xfs_fs_destroy_inode, |
1542 | 1542 | .write_inode = xfs_fs_write_inode, |
ipc/mqueue.c
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 | |
78 | 78 | static const struct inode_operations mqueue_dir_inode_operations; |
79 | 79 | static const struct file_operations mqueue_file_operations; |
80 | -static struct super_operations mqueue_super_ops; | |
80 | +static const struct super_operations mqueue_super_ops; | |
81 | 81 | static void remove_notification(struct mqueue_inode_info *info); |
82 | 82 | |
83 | 83 | static struct kmem_cache *mqueue_inode_cachep; |
... | ... | @@ -1224,7 +1224,7 @@ |
1224 | 1224 | .read = mqueue_read_file, |
1225 | 1225 | }; |
1226 | 1226 | |
1227 | -static struct super_operations mqueue_super_ops = { | |
1227 | +static const struct super_operations mqueue_super_ops = { | |
1228 | 1228 | .alloc_inode = mqueue_alloc_inode, |
1229 | 1229 | .destroy_inode = mqueue_destroy_inode, |
1230 | 1230 | .statfs = simple_statfs, |
kernel/cgroup.c
net/socket.c
net/sunrpc/rpc_pipe.c