Skip to content

Commit b87221d

Browse files
Alexey Dobriyantorvalds
authored andcommitted
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>
1 parent 0d54b21 commit b87221d

18 files changed

Lines changed: 23 additions & 24 deletions

File tree

‎arch/powerpc/platforms/cell/spufs/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ static int
773773
spufs_fill_super(struct super_block *sb, void *data, int silent)
774774
{
775775
struct spufs_sb_info *info;
776-
static struct super_operations s_ops = {
776+
static const struct super_operations s_ops = {
777777
.alloc_inode = spufs_alloc_inode,
778778
.destroy_inode = spufs_destroy_inode,
779779
.statfs = simple_statfs,

‎arch/s390/hypfs/inode.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct hypfs_sb_info {
4141

4242
static const struct file_operations hypfs_file_ops;
4343
static struct file_system_type hypfs_type;
44-
static struct super_operations hypfs_s_ops;
44+
static const struct super_operations hypfs_s_ops;
4545

4646
/* start of list of all dentries, which have to be deleted on update */
4747
static struct dentry *hypfs_last_dentry;
@@ -472,7 +472,7 @@ static struct file_system_type hypfs_type = {
472472
.kill_sb = hypfs_kill_super
473473
};
474474

475-
static struct super_operations hypfs_s_ops = {
475+
static const struct super_operations hypfs_s_ops = {
476476
.statfs = simple_statfs,
477477
.drop_inode = hypfs_drop_inode,
478478
.show_options = hypfs_show_options,

‎drivers/isdn/capi/capifs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static int capifs_remount(struct super_block *s, int *flags, char *data)
8989
return 0;
9090
}
9191

92-
static struct super_operations capifs_sops =
92+
static const struct super_operations capifs_sops =
9393
{
9494
.statfs = simple_statfs,
9595
.remount_fs = capifs_remount,

‎drivers/misc/ibmasm/ibmasmfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int ibmasmfs_get_super(struct file_system_type *fst,
9797
return get_sb_single(fst, flags, data, ibmasmfs_fill_super, mnt);
9898
}
9999

100-
static struct super_operations ibmasmfs_s_ops = {
100+
static const struct super_operations ibmasmfs_s_ops = {
101101
.statfs = simple_statfs,
102102
.drop_inode = generic_delete_inode,
103103
};

‎drivers/oprofile/oprofilefs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode)
3535
}
3636

3737

38-
static struct super_operations s_ops = {
38+
static const struct super_operations s_ops = {
3939
.statfs = simple_statfs,
4040
.drop_inode = generic_delete_inode,
4141
};

‎drivers/usb/core/inode.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#define USBFS_DEFAULT_BUSMODE (S_IXUGO | S_IRUGO)
4949
#define USBFS_DEFAULT_LISTMODE S_IRUGO
5050

51-
static struct super_operations usbfs_ops;
5251
static const struct file_operations default_file_operations;
5352
static struct vfsmount *usbfs_mount;
5453
static int usbfs_mount_count; /* = 0 */
@@ -449,7 +448,7 @@ static const struct file_operations default_file_operations = {
449448
.llseek = default_file_lseek,
450449
};
451450

452-
static struct super_operations usbfs_ops = {
451+
static const struct super_operations usbfs_ops = {
453452
.statfs = simple_statfs,
454453
.drop_inode = generic_delete_inode,
455454
.remount_fs = remount,

‎drivers/usb/gadget/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,7 @@ gadgetfs_create_file (struct super_block *sb, char const *name,
20332033
return inode;
20342034
}
20352035

2036-
static struct super_operations gadget_fs_operations = {
2036+
static const struct super_operations gadget_fs_operations = {
20372037
.statfs = simple_statfs,
20382038
.drop_inode = generic_delete_inode,
20392039
};

‎fs/befs/linuxvfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
842842
sb->s_magic = BEFS_SUPER_MAGIC;
843843
/* Set real blocksize of fs */
844844
sb_set_blocksize(sb, (ulong) befs_sb->block_size);
845-
sb->s_op = (struct super_operations *) &befs_sops;
845+
sb->s_op = &befs_sops;
846846
root = befs_iget(sb, iaddr2blockno(sb, &(befs_sb->root_dir)));
847847
if (IS_ERR(root)) {
848848
ret = PTR_ERR(root);

‎fs/btrfs/super.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#include "export.h"
5252
#include "compression.h"
5353

54-
static struct super_operations btrfs_super_ops;
54+
static const struct super_operations btrfs_super_ops;
5555

5656
static void btrfs_put_super(struct super_block *sb)
5757
{
@@ -675,7 +675,7 @@ static int btrfs_unfreeze(struct super_block *sb)
675675
return 0;
676676
}
677677

678-
static struct super_operations btrfs_super_ops = {
678+
static const struct super_operations btrfs_super_ops = {
679679
.delete_inode = btrfs_delete_inode,
680680
.put_super = btrfs_put_super,
681681
.sync_fs = btrfs_sync_fs,

‎fs/nilfs2/super.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ static int nilfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
504504
return 0;
505505
}
506506

507-
static struct super_operations nilfs_sops = {
507+
static const struct super_operations nilfs_sops = {
508508
.alloc_inode = nilfs_alloc_inode,
509509
.destroy_inode = nilfs_destroy_inode,
510510
.dirty_inode = nilfs_dirty_inode,

0 commit comments

Comments
 (0)