Skip to content

Commit

Permalink
const: mark remaining super_operations const
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexey Dobriyan authored and torvalds committed Sep 22, 2009
1 parent 0d54b21 commit b87221d
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ static int
spufs_fill_super(struct super_block *sb, void *data, int silent)
{
struct spufs_sb_info *info;
static struct super_operations s_ops = {
static const struct super_operations s_ops = {
.alloc_inode = spufs_alloc_inode,
.destroy_inode = spufs_destroy_inode,
.statfs = simple_statfs,
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/hypfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct hypfs_sb_info {

static const struct file_operations hypfs_file_ops;
static struct file_system_type hypfs_type;
static struct super_operations hypfs_s_ops;
static const struct super_operations hypfs_s_ops;

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

static struct super_operations hypfs_s_ops = {
static const struct super_operations hypfs_s_ops = {
.statfs = simple_statfs,
.drop_inode = hypfs_drop_inode,
.show_options = hypfs_show_options,
Expand Down
2 changes: 1 addition & 1 deletion drivers/isdn/capi/capifs.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static int capifs_remount(struct super_block *s, int *flags, char *data)
return 0;
}

static struct super_operations capifs_sops =
static const struct super_operations capifs_sops =
{
.statfs = simple_statfs,
.remount_fs = capifs_remount,
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/ibmasm/ibmasmfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static int ibmasmfs_get_super(struct file_system_type *fst,
return get_sb_single(fst, flags, data, ibmasmfs_fill_super, mnt);
}

static struct super_operations ibmasmfs_s_ops = {
static const struct super_operations ibmasmfs_s_ops = {
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/oprofile/oprofilefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode)
}


static struct super_operations s_ops = {
static const struct super_operations s_ops = {
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
};
Expand Down
3 changes: 1 addition & 2 deletions drivers/usb/core/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#define USBFS_DEFAULT_BUSMODE (S_IXUGO | S_IRUGO)
#define USBFS_DEFAULT_LISTMODE S_IRUGO

static struct super_operations usbfs_ops;
static const struct file_operations default_file_operations;
static struct vfsmount *usbfs_mount;
static int usbfs_mount_count; /* = 0 */
Expand Down Expand Up @@ -449,7 +448,7 @@ static const struct file_operations default_file_operations = {
.llseek = default_file_lseek,
};

static struct super_operations usbfs_ops = {
static const struct super_operations usbfs_ops = {
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
.remount_fs = remount,
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ gadgetfs_create_file (struct super_block *sb, char const *name,
return inode;
}

static struct super_operations gadget_fs_operations = {
static const struct super_operations gadget_fs_operations = {
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
};
Expand Down
2 changes: 1 addition & 1 deletion fs/befs/linuxvfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
sb->s_magic = BEFS_SUPER_MAGIC;
/* Set real blocksize of fs */
sb_set_blocksize(sb, (ulong) befs_sb->block_size);
sb->s_op = (struct super_operations *) &befs_sops;
sb->s_op = &befs_sops;
root = befs_iget(sb, iaddr2blockno(sb, &(befs_sb->root_dir)));
if (IS_ERR(root)) {
ret = PTR_ERR(root);
Expand Down
4 changes: 2 additions & 2 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include "export.h"
#include "compression.h"

static struct super_operations btrfs_super_ops;
static const struct super_operations btrfs_super_ops;

static void btrfs_put_super(struct super_block *sb)
{
Expand Down Expand Up @@ -675,7 +675,7 @@ static int btrfs_unfreeze(struct super_block *sb)
return 0;
}

static struct super_operations btrfs_super_ops = {
static const struct super_operations btrfs_super_ops = {
.delete_inode = btrfs_delete_inode,
.put_super = btrfs_put_super,
.sync_fs = btrfs_sync_fs,
Expand Down
2 changes: 1 addition & 1 deletion fs/nilfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ static int nilfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
return 0;
}

static struct super_operations nilfs_sops = {
static const struct super_operations nilfs_sops = {
.alloc_inode = nilfs_alloc_inode,
.destroy_inode = nilfs_destroy_inode,
.dirty_inode = nilfs_dirty_inode,
Expand Down
2 changes: 1 addition & 1 deletion fs/omfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ static int omfs_statfs(struct dentry *dentry, struct kstatfs *buf)
return 0;
}

static struct super_operations omfs_sops = {
static const struct super_operations omfs_sops = {
.write_inode = omfs_write_inode,
.delete_inode = omfs_delete_inode,
.put_super = omfs_put_super,
Expand Down
4 changes: 2 additions & 2 deletions fs/squashfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include "squashfs.h"

static struct file_system_type squashfs_fs_type;
static struct super_operations squashfs_super_ops;
static const struct super_operations squashfs_super_ops;

static int supported_squashfs_filesystem(short major, short minor, short comp)
{
Expand Down Expand Up @@ -444,7 +444,7 @@ static struct file_system_type squashfs_fs_type = {
.fs_flags = FS_REQUIRES_DEV
};

static struct super_operations squashfs_super_ops = {
static const struct super_operations squashfs_super_ops = {
.alloc_inode = squashfs_alloc_inode,
.destroy_inode = squashfs_destroy_inode,
.statfs = squashfs_statfs,
Expand Down
2 changes: 1 addition & 1 deletion fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ DEFINE_SPINLOCK(sb_lock);
static struct super_block *alloc_super(struct file_system_type *type)
{
struct super_block *s = kzalloc(sizeof(struct super_block), GFP_USER);
static struct super_operations default_op;
static const struct super_operations default_op;

if (s) {
if (security_sb_alloc(s)) {
Expand Down
4 changes: 2 additions & 2 deletions fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#include <linux/freezer.h>
#include <linux/parser.h>

static struct super_operations xfs_super_operations;
static const struct super_operations xfs_super_operations;
static kmem_zone_t *xfs_ioend_zone;
mempool_t *xfs_ioend_pool;

Expand Down Expand Up @@ -1536,7 +1536,7 @@ xfs_fs_get_sb(
mnt);
}

static struct super_operations xfs_super_operations = {
static const struct super_operations xfs_super_operations = {
.alloc_inode = xfs_fs_alloc_inode,
.destroy_inode = xfs_fs_destroy_inode,
.write_inode = xfs_fs_write_inode,
Expand Down
4 changes: 2 additions & 2 deletions ipc/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct mqueue_inode_info {

static const struct inode_operations mqueue_dir_inode_operations;
static const struct file_operations mqueue_file_operations;
static struct super_operations mqueue_super_ops;
static const struct super_operations mqueue_super_ops;
static void remove_notification(struct mqueue_inode_info *info);

static struct kmem_cache *mqueue_inode_cachep;
Expand Down Expand Up @@ -1224,7 +1224,7 @@ static const struct file_operations mqueue_file_operations = {
.read = mqueue_read_file,
};

static struct super_operations mqueue_super_ops = {
static const struct super_operations mqueue_super_ops = {
.alloc_inode = mqueue_alloc_inode,
.destroy_inode = mqueue_destroy_inode,
.statfs = simple_statfs,
Expand Down
2 changes: 1 addition & 1 deletion kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ static int cgroup_remount(struct super_block *sb, int *flags, char *data)
return ret;
}

static struct super_operations cgroup_ops = {
static const struct super_operations cgroup_ops = {
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
.show_options = cgroup_show_options,
Expand Down
2 changes: 1 addition & 1 deletion net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static int init_inodecache(void)
return 0;
}

static struct super_operations sockfs_ops = {
static const struct super_operations sockfs_ops = {
.alloc_inode = sock_alloc_inode,
.destroy_inode =sock_destroy_inode,
.statfs = simple_statfs,
Expand Down
2 changes: 1 addition & 1 deletion net/sunrpc/rpc_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ void rpc_remove_cache_dir(struct dentry *dentry)
/*
* populate the filesystem
*/
static struct super_operations s_ops = {
static const struct super_operations s_ops = {
.alloc_inode = rpc_alloc_inode,
.destroy_inode = rpc_destroy_inode,
.statfs = simple_statfs,
Expand Down

0 comments on commit b87221d

Please sign in to comment.