Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee9b6d61 authored by Josef 'Jeff' Sipek's avatar Josef 'Jeff' Sipek Committed by Linus Torvalds
Browse files

[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: default avatarJosef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c5ef1c42
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -45,7 +45,7 @@
#include "fid.h"
#include "fid.h"


static void v9fs_clear_inode(struct inode *);
static void v9fs_clear_inode(struct inode *);
static struct super_operations v9fs_super_ops;
static const struct super_operations v9fs_super_ops;


/**
/**
 * v9fs_clear_inode - release an inode
 * v9fs_clear_inode - release an inode
@@ -263,7 +263,7 @@ v9fs_umount_begin(struct vfsmount *vfsmnt, int flags)
		v9fs_session_cancel(v9ses);
		v9fs_session_cancel(v9ses);
}
}


static struct super_operations v9fs_super_ops = {
static const struct super_operations v9fs_super_ops = {
	.statfs = simple_statfs,
	.statfs = simple_statfs,
	.clear_inode = v9fs_clear_inode,
	.clear_inode = v9fs_clear_inode,
	.show_options = v9fs_show_options,
	.show_options = v9fs_show_options,
+1 −1
Original line number Original line Diff line number Diff line
@@ -254,7 +254,7 @@ static void destroy_inodecache(void)
	kmem_cache_destroy(adfs_inode_cachep);
	kmem_cache_destroy(adfs_inode_cachep);
}
}


static struct super_operations adfs_sops = {
static const struct super_operations adfs_sops = {
	.alloc_inode	= adfs_alloc_inode,
	.alloc_inode	= adfs_alloc_inode,
	.destroy_inode	= adfs_destroy_inode,
	.destroy_inode	= adfs_destroy_inode,
	.write_inode	= adfs_write_inode,
	.write_inode	= adfs_write_inode,
+1 −1
Original line number Original line Diff line number Diff line
@@ -112,7 +112,7 @@ static void destroy_inodecache(void)
	kmem_cache_destroy(affs_inode_cachep);
	kmem_cache_destroy(affs_inode_cachep);
}
}


static struct super_operations affs_sops = {
static const struct super_operations affs_sops = {
	.alloc_inode	= affs_alloc_inode,
	.alloc_inode	= affs_alloc_inode,
	.destroy_inode	= affs_destroy_inode,
	.destroy_inode	= affs_destroy_inode,
	.read_inode	= affs_read_inode,
	.read_inode	= affs_read_inode,
+1 −1
Original line number Original line Diff line number Diff line
@@ -56,7 +56,7 @@ struct file_system_type afs_fs_type = {
	.fs_flags	= FS_BINARY_MOUNTDATA,
	.fs_flags	= FS_BINARY_MOUNTDATA,
};
};


static struct super_operations afs_super_ops = {
static const struct super_operations afs_super_ops = {
	.statfs		= simple_statfs,
	.statfs		= simple_statfs,
	.alloc_inode	= afs_alloc_inode,
	.alloc_inode	= afs_alloc_inode,
	.drop_inode	= generic_delete_inode,
	.drop_inode	= generic_delete_inode,
+1 −1
Original line number Original line Diff line number Diff line
@@ -52,7 +52,7 @@ out_kill_sb:


static void autofs_read_inode(struct inode *inode);
static void autofs_read_inode(struct inode *inode);


static struct super_operations autofs_sops = {
static const struct super_operations autofs_sops = {
	.read_inode	= autofs_read_inode,
	.read_inode	= autofs_read_inode,
	.statfs		= simple_statfs,
	.statfs		= simple_statfs,
};
};
Loading