[GFS2] Mark file_operations const
authorSteven Whitehouse <swhiteho@redhat.com>
Mon, 3 Jul 2006 17:47:02 +0000 (13:47 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 3 Jul 2006 17:47:02 +0000 (13:47 -0400)
As per Arjan's patches:
http://www.kernel.org/git/?p=linux/kernel/git/steve/gfs2-2.6.git;a=commitdiff;h=99ac48f54a91d02140c497edc31dc57d4bc5c85d
and
http://www.kernel.org/git/?p=linux/kernel/git/steve/gfs2-2.6.git;a=commitdiff;h=4b6f5d20b04dcbc3d888555522b90ba6d36c4106

make the GFS2 file_operations structures const.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/ops_file.c
fs/gfs2/ops_file.h

index ecef76e8373a94c46a82d58d2d4e1f65cd394e4c..c8e2c98700a7155a93743e626ba3e8c2c7960192 100644 (file)
@@ -950,7 +950,7 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
                return do_flock(file, cmd, fl);
 }
 
-struct file_operations gfs2_file_fops = {
+const struct file_operations gfs2_file_fops = {
        .llseek = gfs2_llseek,
        .read = gfs2_read,
        .readv = gfs2_file_readv,
@@ -970,7 +970,7 @@ struct file_operations gfs2_file_fops = {
        .splice_write = generic_file_splice_write,
 };
 
-struct file_operations gfs2_dir_fops = {
+const struct file_operations gfs2_dir_fops = {
        .readdir = gfs2_readdir,
        .unlocked_ioctl = gfs2_ioctl,
        .open = gfs2_open,
index a2edce38f5cb517129f9ca42b8cbb86bf8319e94..46302b51393773f7fe0c2ad3454cc3e61997dd8e 100644 (file)
@@ -14,7 +14,7 @@ extern int gfs2_internal_read(struct gfs2_inode *ip,
                              struct file_ra_state *ra_state,
                              char *buf, loff_t *pos, unsigned size);
 
-extern struct file_operations gfs2_file_fops;
-extern struct file_operations gfs2_dir_fops;
+extern const struct file_operations gfs2_file_fops;
+extern const struct file_operations gfs2_dir_fops;
 
 #endif /* __OPS_FILE_DOT_H__ */