* [PATCH] mark address_space_operations const
@ 2006-05-03 13:18 Christoph Hellwig
2006-05-09 5:30 ` Prasanna S Panchamukhi
2006-05-12 11:20 ` Andrew Morton
0 siblings, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2006-05-03 13:18 UTC (permalink / raw)
To: akpm, linux-fsdevel
Same as with already do with the file operations:
keep them in .rodata and prevents people from doing runtime patching.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/drivers/block/loop.c
===================================================================
--- linux-2.6.orig/drivers/block/loop.c 2006-04-04 16:50:09.000000000 +0200
+++ linux-2.6/drivers/block/loop.c 2006-05-03 15:01:57.000000000 +0200
@@ -210,7 +210,7 @@
{
struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
struct address_space *mapping = file->f_mapping;
- struct address_space_operations *aops = mapping->a_ops;
+ const struct address_space_operations *aops = mapping->a_ops;
pgoff_t index;
unsigned offset, bv_offs;
int len, ret;
@@ -784,7 +784,7 @@
error = -EINVAL;
if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) {
- struct address_space_operations *aops = mapping->a_ops;
+ const struct address_space_operations *aops = mapping->a_ops;
/*
* If we can't read - sorry. If we only can't write - well,
* it's going to be read-only.
Index: linux-2.6/drivers/block/rd.c
===================================================================
--- linux-2.6.orig/drivers/block/rd.c 2006-04-04 16:50:09.000000000 +0200
+++ linux-2.6/drivers/block/rd.c 2006-05-03 15:02:04.000000000 +0200
@@ -191,7 +191,7 @@
return 0;
}
-static struct address_space_operations ramdisk_aops = {
+static const struct address_space_operations ramdisk_aops = {
.readpage = ramdisk_readpage,
.prepare_write = ramdisk_prepare_write,
.commit_write = ramdisk_commit_write,
Index: linux-2.6/fs/9p/v9fs_vfs.h
===================================================================
--- linux-2.6.orig/fs/9p/v9fs_vfs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/9p/v9fs_vfs.h 2006-05-03 15:02:38.000000000 +0200
@@ -38,7 +38,7 @@
*/
extern struct file_system_type v9fs_fs_type;
-extern struct address_space_operations v9fs_addr_operations;
+extern const struct address_space_operations v9fs_addr_operations;
extern const struct file_operations v9fs_file_operations;
extern const struct file_operations v9fs_dir_operations;
extern struct dentry_operations v9fs_dentry_operations;
Index: linux-2.6/fs/9p/vfs_addr.c
===================================================================
--- linux-2.6.orig/fs/9p/vfs_addr.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/9p/vfs_addr.c 2006-05-03 15:02:43.000000000 +0200
@@ -103,6 +103,6 @@
return retval;
}
-struct address_space_operations v9fs_addr_operations = {
+const struct address_space_operations v9fs_addr_operations = {
.readpage = v9fs_vfs_readpage,
};
Index: linux-2.6/fs/adfs/inode.c
===================================================================
--- linux-2.6.orig/fs/adfs/inode.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/adfs/inode.c 2006-05-03 15:02:47.000000000 +0200
@@ -72,7 +72,7 @@
return generic_block_bmap(mapping, block, adfs_get_block);
}
-static struct address_space_operations adfs_aops = {
+static const struct address_space_operations adfs_aops = {
.readpage = adfs_readpage,
.writepage = adfs_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/affs/affs.h
===================================================================
--- linux-2.6.orig/fs/affs/affs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/affs/affs.h 2006-05-03 15:02:53.000000000 +0200
@@ -195,9 +195,9 @@
extern const struct file_operations affs_file_operations;
extern const struct file_operations affs_file_operations_ofs;
extern const struct file_operations affs_dir_operations;
-extern struct address_space_operations affs_symlink_aops;
-extern struct address_space_operations affs_aops;
-extern struct address_space_operations affs_aops_ofs;
+extern const struct address_space_operations affs_symlink_aops;
+extern const struct address_space_operations affs_aops;
+extern const struct address_space_operations affs_aops_ofs;
extern struct dentry_operations affs_dentry_operations;
extern struct dentry_operations affs_dentry_operations_intl;
Index: linux-2.6/fs/affs/file.c
===================================================================
--- linux-2.6.orig/fs/affs/file.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/affs/file.c 2006-05-03 15:02:58.000000000 +0200
@@ -406,7 +406,7 @@
{
return generic_block_bmap(mapping,block,affs_get_block);
}
-struct address_space_operations affs_aops = {
+const struct address_space_operations affs_aops = {
.readpage = affs_readpage,
.writepage = affs_writepage,
.sync_page = block_sync_page,
@@ -759,7 +759,7 @@
goto done;
}
-struct address_space_operations affs_aops_ofs = {
+const struct address_space_operations affs_aops_ofs = {
.readpage = affs_readpage_ofs,
//.writepage = affs_writepage_ofs,
//.sync_page = affs_sync_page_ofs,
Index: linux-2.6/fs/affs/symlink.c
===================================================================
--- linux-2.6.orig/fs/affs/symlink.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/affs/symlink.c 2006-05-03 15:03:02.000000000 +0200
@@ -66,7 +66,7 @@
return err;
}
-struct address_space_operations affs_symlink_aops = {
+const struct address_space_operations affs_symlink_aops = {
.readpage = affs_symlink_readpage,
};
Index: linux-2.6/fs/afs/file.c
===================================================================
--- linux-2.6.orig/fs/afs/file.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/afs/file.c 2006-05-03 15:03:06.000000000 +0200
@@ -35,7 +35,7 @@
.getattr = afs_inode_getattr,
};
-struct address_space_operations afs_fs_aops = {
+const struct address_space_operations afs_fs_aops = {
.readpage = afs_file_readpage,
.sync_page = block_sync_page,
.set_page_dirty = __set_page_dirty_nobuffers,
Index: linux-2.6/fs/afs/internal.h
===================================================================
--- linux-2.6.orig/fs/afs/internal.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/afs/internal.h 2006-05-03 15:03:10.000000000 +0200
@@ -69,7 +69,7 @@
/*
* file.c
*/
-extern struct address_space_operations afs_fs_aops;
+extern const struct address_space_operations afs_fs_aops;
extern struct inode_operations afs_file_inode_operations;
#ifdef AFS_CACHING_SUPPORT
Index: linux-2.6/fs/befs/linuxvfs.c
===================================================================
--- linux-2.6.orig/fs/befs/linuxvfs.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/befs/linuxvfs.c 2006-05-03 15:03:12.000000000 +0200
@@ -73,7 +73,7 @@
.lookup = befs_lookup,
};
-static struct address_space_operations befs_aops = {
+static const struct address_space_operations befs_aops = {
.readpage = befs_readpage,
.sync_page = block_sync_page,
.bmap = befs_bmap,
Index: linux-2.6/fs/bfs/bfs.h
===================================================================
--- linux-2.6.orig/fs/bfs/bfs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/bfs/bfs.h 2006-05-03 15:03:20.000000000 +0200
@@ -50,7 +50,7 @@
/* file.c */
extern struct inode_operations bfs_file_inops;
extern const struct file_operations bfs_file_operations;
-extern struct address_space_operations bfs_aops;
+extern const struct address_space_operations bfs_aops;
/* dir.c */
extern struct inode_operations bfs_dir_inops;
Index: linux-2.6/fs/bfs/file.c
===================================================================
--- linux-2.6.orig/fs/bfs/file.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/bfs/file.c 2006-05-03 15:03:23.000000000 +0200
@@ -153,7 +153,7 @@
return generic_block_bmap(mapping, block, bfs_get_block);
}
-struct address_space_operations bfs_aops = {
+const struct address_space_operations bfs_aops = {
.readpage = bfs_readpage,
.writepage = bfs_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/block_dev.c
===================================================================
--- linux-2.6.orig/fs/block_dev.c 2006-05-02 16:26:14.000000000 +0200
+++ linux-2.6/fs/block_dev.c 2006-05-03 15:03:28.000000000 +0200
@@ -1077,7 +1077,7 @@
return blkdev_ioctl(file->f_mapping->host, file, cmd, arg);
}
-struct address_space_operations def_blk_aops = {
+const const struct address_space_operations def_blk_aops = {
.readpage = blkdev_readpage,
.writepage = blkdev_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/buffer.c
===================================================================
--- linux-2.6.orig/fs/buffer.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/buffer.c 2006-05-03 15:03:32.000000000 +0200
@@ -2600,7 +2600,7 @@
unsigned offset = from & (PAGE_CACHE_SIZE-1);
unsigned to;
struct page *page;
- struct address_space_operations *a_ops = mapping->a_ops;
+ const struct address_space_operations *a_ops = mapping->a_ops;
char *kaddr;
int ret = 0;
Index: linux-2.6/fs/cifs/cifsfs.h
===================================================================
--- linux-2.6.orig/fs/cifs/cifsfs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/cifs/cifsfs.h 2006-05-03 15:03:35.000000000 +0200
@@ -32,7 +32,7 @@
#define TRUE 1
#endif
-extern struct address_space_operations cifs_addr_ops;
+extern const struct address_space_operations cifs_addr_ops;
/* Functions related to super block operations */
extern struct super_operations cifs_super_ops;
Index: linux-2.6/fs/cifs/file.c
===================================================================
--- linux-2.6.orig/fs/cifs/file.c 2006-04-25 15:53:07.000000000 +0200
+++ linux-2.6/fs/cifs/file.c 2006-05-03 15:03:38.000000000 +0200
@@ -1944,7 +1944,7 @@
return 0;
}
-struct address_space_operations cifs_addr_ops = {
+const struct address_space_operations cifs_addr_ops = {
.readpage = cifs_readpage,
.readpages = cifs_readpages,
.writepage = cifs_writepage,
Index: linux-2.6/fs/coda/symlink.c
===================================================================
--- linux-2.6.orig/fs/coda/symlink.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/coda/symlink.c 2006-05-03 15:03:41.000000000 +0200
@@ -50,6 +50,6 @@
return error;
}
-struct address_space_operations coda_symlink_aops = {
+const struct address_space_operations coda_symlink_aops = {
.readpage = coda_symlink_filler,
};
Index: linux-2.6/fs/configfs/inode.c
===================================================================
--- linux-2.6.orig/fs/configfs/inode.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/configfs/inode.c 2006-05-03 15:03:44.000000000 +0200
@@ -38,7 +38,7 @@
extern struct super_block * configfs_sb;
-static struct address_space_operations configfs_aops = {
+static const struct address_space_operations configfs_aops = {
.readpage = simple_readpage,
.prepare_write = simple_prepare_write,
.commit_write = simple_commit_write
Index: linux-2.6/fs/cramfs/inode.c
===================================================================
--- linux-2.6.orig/fs/cramfs/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/cramfs/inode.c 2006-05-03 15:03:47.000000000 +0200
@@ -30,7 +30,7 @@
static struct super_operations cramfs_ops;
static struct inode_operations cramfs_dir_inode_operations;
static const struct file_operations cramfs_directory_operations;
-static struct address_space_operations cramfs_aops;
+static const struct address_space_operations cramfs_aops;
static DEFINE_MUTEX(read_mutex);
@@ -501,7 +501,7 @@
return 0;
}
-static struct address_space_operations cramfs_aops = {
+static const struct address_space_operations cramfs_aops = {
.readpage = cramfs_readpage
};
Index: linux-2.6/fs/efs/inode.c
===================================================================
--- linux-2.6.orig/fs/efs/inode.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/efs/inode.c 2006-05-03 15:03:50.000000000 +0200
@@ -21,7 +21,7 @@
{
return generic_block_bmap(mapping,block,efs_get_block);
}
-static struct address_space_operations efs_aops = {
+static const struct address_space_operations efs_aops = {
.readpage = efs_readpage,
.sync_page = block_sync_page,
.bmap = _efs_bmap
Index: linux-2.6/fs/efs/symlink.c
===================================================================
--- linux-2.6.orig/fs/efs/symlink.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/efs/symlink.c 2006-05-03 15:03:53.000000000 +0200
@@ -53,6 +53,6 @@
return err;
}
-struct address_space_operations efs_symlink_aops = {
+const struct address_space_operations efs_symlink_aops = {
.readpage = efs_symlink_readpage
};
Index: linux-2.6/fs/ext2/ext2.h
===================================================================
--- linux-2.6.orig/fs/ext2/ext2.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/ext2/ext2.h 2006-05-03 15:03:56.000000000 +0200
@@ -162,9 +162,9 @@
extern const struct file_operations ext2_xip_file_operations;
/* inode.c */
-extern struct address_space_operations ext2_aops;
-extern struct address_space_operations ext2_aops_xip;
-extern struct address_space_operations ext2_nobh_aops;
+extern const struct address_space_operations ext2_aops;
+extern const struct address_space_operations ext2_aops_xip;
+extern const struct address_space_operations ext2_nobh_aops;
/* namei.c */
extern struct inode_operations ext2_dir_inode_operations;
Index: linux-2.6/fs/ext2/inode.c
===================================================================
--- linux-2.6.orig/fs/ext2/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/ext2/inode.c 2006-05-03 15:03:58.000000000 +0200
@@ -684,7 +684,7 @@
return mpage_writepages(mapping, wbc, ext2_get_block);
}
-struct address_space_operations ext2_aops = {
+const struct address_space_operations ext2_aops = {
.readpage = ext2_readpage,
.readpages = ext2_readpages,
.writepage = ext2_writepage,
@@ -697,12 +697,12 @@
.migratepage = buffer_migrate_page,
};
-struct address_space_operations ext2_aops_xip = {
+const struct address_space_operations ext2_aops_xip = {
.bmap = ext2_bmap,
.get_xip_page = ext2_get_xip_page,
};
-struct address_space_operations ext2_nobh_aops = {
+const struct address_space_operations ext2_nobh_aops = {
.readpage = ext2_readpage,
.readpages = ext2_readpages,
.writepage = ext2_nobh_writepage,
Index: linux-2.6/fs/ext3/inode.c
===================================================================
--- linux-2.6.orig/fs/ext3/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/ext3/inode.c 2006-05-03 15:04:01.000000000 +0200
@@ -1696,7 +1696,7 @@
return __set_page_dirty_nobuffers(page);
}
-static struct address_space_operations ext3_ordered_aops = {
+static const struct address_space_operations ext3_ordered_aops = {
.readpage = ext3_readpage,
.readpages = ext3_readpages,
.writepage = ext3_ordered_writepage,
@@ -1710,7 +1710,7 @@
.migratepage = buffer_migrate_page,
};
-static struct address_space_operations ext3_writeback_aops = {
+static const struct address_space_operations ext3_writeback_aops = {
.readpage = ext3_readpage,
.readpages = ext3_readpages,
.writepage = ext3_writeback_writepage,
@@ -1724,7 +1724,7 @@
.migratepage = buffer_migrate_page,
};
-static struct address_space_operations ext3_journalled_aops = {
+static const struct address_space_operations ext3_journalled_aops = {
.readpage = ext3_readpage,
.readpages = ext3_readpages,
.writepage = ext3_journalled_writepage,
Index: linux-2.6/fs/fat/inode.c
===================================================================
--- linux-2.6.orig/fs/fat/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/fat/inode.c 2006-05-03 15:04:03.000000000 +0200
@@ -196,7 +196,7 @@
return generic_block_bmap(mapping, block, fat_get_block);
}
-static struct address_space_operations fat_aops = {
+static const struct address_space_operations fat_aops = {
.readpage = fat_readpage,
.readpages = fat_readpages,
.writepage = fat_writepage,
Index: linux-2.6/fs/freevxfs/vxfs_immed.c
===================================================================
--- linux-2.6.orig/fs/freevxfs/vxfs_immed.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/freevxfs/vxfs_immed.c 2006-05-03 15:04:06.000000000 +0200
@@ -56,7 +56,7 @@
/*
* Adress space operations for immed files and directories.
*/
-struct address_space_operations vxfs_immed_aops = {
+const struct address_space_operations vxfs_immed_aops = {
.readpage = vxfs_immed_readpage,
};
Index: linux-2.6/fs/freevxfs/vxfs_inode.c
===================================================================
--- linux-2.6.orig/fs/freevxfs/vxfs_inode.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/freevxfs/vxfs_inode.c 2006-05-03 15:04:08.000000000 +0200
@@ -41,8 +41,8 @@
#include "vxfs_extern.h"
-extern struct address_space_operations vxfs_aops;
-extern struct address_space_operations vxfs_immed_aops;
+extern const struct address_space_operations vxfs_aops;
+extern const struct address_space_operations vxfs_immed_aops;
extern struct inode_operations vxfs_immed_symlink_iops;
@@ -295,7 +295,7 @@
{
struct super_block *sbp = ip->i_sb;
struct vxfs_inode_info *vip;
- struct address_space_operations *aops;
+ const struct address_space_operations *aops;
ino_t ino = ip->i_ino;
if (!(vip = __vxfs_iget(ino, VXFS_SBI(sbp)->vsi_ilist)))
Index: linux-2.6/fs/freevxfs/vxfs_subr.c
===================================================================
--- linux-2.6.orig/fs/freevxfs/vxfs_subr.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/freevxfs/vxfs_subr.c 2006-05-03 15:04:11.000000000 +0200
@@ -42,7 +42,7 @@
static int vxfs_readpage(struct file *, struct page *);
static sector_t vxfs_bmap(struct address_space *, sector_t);
-struct address_space_operations vxfs_aops = {
+const struct address_space_operations vxfs_aops = {
.readpage = vxfs_readpage,
.bmap = vxfs_bmap,
.sync_page = block_sync_page,
Index: linux-2.6/fs/fuse/file.c
===================================================================
--- linux-2.6.orig/fs/fuse/file.c 2006-04-25 15:53:07.000000000 +0200
+++ linux-2.6/fs/fuse/file.c 2006-05-03 15:04:13.000000000 +0200
@@ -642,7 +642,7 @@
/* no mmap and sendfile */
};
-static struct address_space_operations fuse_file_aops = {
+static const struct address_space_operations fuse_file_aops = {
.readpage = fuse_readpage,
.prepare_write = fuse_prepare_write,
.commit_write = fuse_commit_write,
Index: linux-2.6/fs/hfs/hfs_fs.h
===================================================================
--- linux-2.6.orig/fs/hfs/hfs_fs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/hfs/hfs_fs.h 2006-05-03 15:04:16.000000000 +0200
@@ -182,8 +182,8 @@
extern int hfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
/* inode.c */
-extern struct address_space_operations hfs_aops;
-extern struct address_space_operations hfs_btree_aops;
+extern const struct address_space_operations hfs_aops;
+extern const struct address_space_operations hfs_btree_aops;
extern struct inode *hfs_new_inode(struct inode *, struct qstr *, int);
extern void hfs_inode_write_fork(struct inode *, struct hfs_extent *, __be32 *, __be32 *);
Index: linux-2.6/fs/hfs/inode.c
===================================================================
--- linux-2.6.orig/fs/hfs/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/hfs/inode.c 2006-05-03 15:04:18.000000000 +0200
@@ -114,7 +114,7 @@
return mpage_writepages(mapping, wbc, hfs_get_block);
}
-struct address_space_operations hfs_btree_aops = {
+const struct address_space_operations hfs_btree_aops = {
.readpage = hfs_readpage,
.writepage = hfs_writepage,
.sync_page = block_sync_page,
@@ -124,7 +124,7 @@
.releasepage = hfs_releasepage,
};
-struct address_space_operations hfs_aops = {
+const struct address_space_operations hfs_aops = {
.readpage = hfs_readpage,
.writepage = hfs_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/hfsplus/hfsplus_fs.h
===================================================================
--- linux-2.6.orig/fs/hfsplus/hfsplus_fs.h 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/hfsplus/hfsplus_fs.h 2006-05-03 15:04:21.000000000 +0200
@@ -323,8 +323,8 @@
void hfsplus_file_truncate(struct inode *);
/* inode.c */
-extern struct address_space_operations hfsplus_aops;
-extern struct address_space_operations hfsplus_btree_aops;
+extern const struct address_space_operations hfsplus_aops;
+extern const struct address_space_operations hfsplus_btree_aops;
void hfsplus_inode_read_fork(struct inode *, struct hfsplus_fork_raw *);
void hfsplus_inode_write_fork(struct inode *, struct hfsplus_fork_raw *);
Index: linux-2.6/fs/hfsplus/inode.c
===================================================================
--- linux-2.6.orig/fs/hfsplus/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/hfsplus/inode.c 2006-05-03 15:04:23.000000000 +0200
@@ -109,7 +109,7 @@
return mpage_writepages(mapping, wbc, hfsplus_get_block);
}
-struct address_space_operations hfsplus_btree_aops = {
+const struct address_space_operations hfsplus_btree_aops = {
.readpage = hfsplus_readpage,
.writepage = hfsplus_writepage,
.sync_page = block_sync_page,
@@ -119,7 +119,7 @@
.releasepage = hfsplus_releasepage,
};
-struct address_space_operations hfsplus_aops = {
+const struct address_space_operations hfsplus_aops = {
.readpage = hfsplus_readpage,
.writepage = hfsplus_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/hostfs/hostfs_kern.c
===================================================================
--- linux-2.6.orig/fs/hostfs/hostfs_kern.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/hostfs/hostfs_kern.c 2006-05-03 15:04:26.000000000 +0200
@@ -54,7 +54,7 @@
static struct inode_operations hostfs_iops;
static struct inode_operations hostfs_dir_iops;
-static struct address_space_operations hostfs_link_aops;
+static const struct address_space_operations hostfs_link_aops;
#ifndef MODULE
static int __init hostfs_args(char *options, int *add)
@@ -518,7 +518,7 @@
return(err);
}
-static struct address_space_operations hostfs_aops = {
+static const struct address_space_operations hostfs_aops = {
.writepage = hostfs_writepage,
.readpage = hostfs_readpage,
.set_page_dirty = __set_page_dirty_nobuffers,
@@ -935,7 +935,7 @@
return(err);
}
-static struct address_space_operations hostfs_link_aops = {
+static const struct address_space_operations hostfs_link_aops = {
.readpage = hostfs_link_readpage,
};
Index: linux-2.6/fs/hpfs/file.c
===================================================================
--- linux-2.6.orig/fs/hpfs/file.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/hpfs/file.c 2006-05-03 15:04:29.000000000 +0200
@@ -99,7 +99,7 @@
{
return generic_block_bmap(mapping,block,hpfs_get_block);
}
-struct address_space_operations hpfs_aops = {
+const struct address_space_operations hpfs_aops = {
.readpage = hpfs_readpage,
.writepage = hpfs_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/hpfs/hpfs_fn.h
===================================================================
--- linux-2.6.orig/fs/hpfs/hpfs_fn.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/hpfs/hpfs_fn.h 2006-05-03 15:04:31.000000000 +0200
@@ -268,7 +268,7 @@
int hpfs_file_fsync(struct file *, struct dentry *, int);
extern const struct file_operations hpfs_file_ops;
extern struct inode_operations hpfs_file_iops;
-extern struct address_space_operations hpfs_aops;
+extern const struct address_space_operations hpfs_aops;
/* inode.c */
@@ -304,7 +304,7 @@
/* namei.c */
extern struct inode_operations hpfs_dir_iops;
-extern struct address_space_operations hpfs_symlink_aops;
+extern const struct address_space_operations hpfs_symlink_aops;
static inline struct hpfs_inode_info *hpfs_i(struct inode *inode)
{
Index: linux-2.6/fs/hpfs/namei.c
===================================================================
--- linux-2.6.orig/fs/hpfs/namei.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/hpfs/namei.c 2006-05-03 15:04:34.000000000 +0200
@@ -538,7 +538,7 @@
return err;
}
-struct address_space_operations hpfs_symlink_aops = {
+const struct address_space_operations hpfs_symlink_aops = {
.readpage = hpfs_symlink_readpage
};
Index: linux-2.6/fs/hugetlbfs/inode.c
===================================================================
--- linux-2.6.orig/fs/hugetlbfs/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/hugetlbfs/inode.c 2006-05-03 15:04:37.000000000 +0200
@@ -34,7 +34,7 @@
#define HUGETLBFS_MAGIC 0x958458f6
static struct super_operations hugetlbfs_ops;
-static struct address_space_operations hugetlbfs_aops;
+static const struct address_space_operations hugetlbfs_aops;
const struct file_operations hugetlbfs_file_operations;
static struct inode_operations hugetlbfs_dir_inode_operations;
static struct inode_operations hugetlbfs_inode_operations;
@@ -549,7 +549,7 @@
kmem_cache_free(hugetlbfs_inode_cachep, HUGETLBFS_I(inode));
}
-static struct address_space_operations hugetlbfs_aops = {
+static const struct address_space_operations hugetlbfs_aops = {
.readpage = hugetlbfs_readpage,
.prepare_write = hugetlbfs_prepare_write,
.commit_write = hugetlbfs_commit_write,
Index: linux-2.6/fs/inode.c
===================================================================
--- linux-2.6.orig/fs/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/inode.c 2006-05-03 15:04:39.000000000 +0200
@@ -102,7 +102,7 @@
static struct inode *alloc_inode(struct super_block *sb)
{
- static struct address_space_operations empty_aops;
+ static const struct address_space_operations empty_aops;
static struct inode_operations empty_iops;
static const struct file_operations empty_fops;
struct inode *inode;
Index: linux-2.6/fs/isofs/compress.c
===================================================================
--- linux-2.6.orig/fs/isofs/compress.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/isofs/compress.c 2006-05-03 15:04:42.000000000 +0200
@@ -312,7 +312,7 @@
return err;
}
-struct address_space_operations zisofs_aops = {
+const struct address_space_operations zisofs_aops = {
.readpage = zisofs_readpage,
/* No sync_page operation supported? */
/* No bmap operation supported */
Index: linux-2.6/fs/isofs/inode.c
===================================================================
--- linux-2.6.orig/fs/isofs/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/isofs/inode.c 2006-05-03 15:04:44.000000000 +0200
@@ -1052,7 +1052,7 @@
return generic_block_bmap(mapping,block,isofs_get_block);
}
-static struct address_space_operations isofs_aops = {
+static const struct address_space_operations isofs_aops = {
.readpage = isofs_readpage,
.sync_page = block_sync_page,
.bmap = _isofs_bmap
Index: linux-2.6/fs/isofs/isofs.h
===================================================================
--- linux-2.6.orig/fs/isofs/isofs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/isofs/isofs.h 2006-05-03 15:04:47.000000000 +0200
@@ -176,5 +176,5 @@
extern struct inode_operations isofs_dir_inode_operations;
extern const struct file_operations isofs_dir_operations;
-extern struct address_space_operations isofs_symlink_aops;
+extern const struct address_space_operations isofs_symlink_aops;
extern struct export_operations isofs_export_ops;
Index: linux-2.6/fs/isofs/rock.c
===================================================================
--- linux-2.6.orig/fs/isofs/rock.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/isofs/rock.c 2006-05-03 15:04:51.000000000 +0200
@@ -754,6 +754,6 @@
return -EIO;
}
-struct address_space_operations isofs_symlink_aops = {
+const struct address_space_operations isofs_symlink_aops = {
.readpage = rock_ridge_symlink_readpage
};
Index: linux-2.6/fs/isofs/zisofs.h
===================================================================
--- linux-2.6.orig/fs/isofs/zisofs.h 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/isofs/zisofs.h 2006-05-03 15:04:54.000000000 +0200
@@ -15,7 +15,7 @@
*/
#ifdef CONFIG_ZISOFS
-extern struct address_space_operations zisofs_aops;
+extern const struct address_space_operations zisofs_aops;
extern int __init zisofs_init(void);
extern void zisofs_cleanup(void);
#endif
Index: linux-2.6/fs/jffs/inode-v23.c
===================================================================
--- linux-2.6.orig/fs/jffs/inode-v23.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/jffs/inode-v23.c 2006-05-03 15:04:56.000000000 +0200
@@ -59,7 +59,7 @@
static struct inode_operations jffs_file_inode_operations;
static const struct file_operations jffs_dir_operations;
static struct inode_operations jffs_dir_inode_operations;
-static struct address_space_operations jffs_address_operations;
+static const struct address_space_operations jffs_address_operations;
kmem_cache_t *node_cache = NULL;
kmem_cache_t *fm_cache = NULL;
@@ -1614,7 +1614,7 @@
} /* jffs_ioctl() */
-static struct address_space_operations jffs_address_operations = {
+static const struct address_space_operations jffs_address_operations = {
.readpage = jffs_readpage,
.prepare_write = jffs_prepare_write,
.commit_write = jffs_commit_write,
Index: linux-2.6/fs/jffs2/file.c
===================================================================
--- linux-2.6.orig/fs/jffs2/file.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/jffs2/file.c 2006-05-03 15:04:59.000000000 +0200
@@ -57,7 +57,7 @@
.setattr = jffs2_setattr
};
-struct address_space_operations jffs2_file_address_operations =
+const struct address_space_operations jffs2_file_address_operations =
{
.readpage = jffs2_readpage,
.prepare_write =jffs2_prepare_write,
Index: linux-2.6/fs/jffs2/os-linux.h
===================================================================
--- linux-2.6.orig/fs/jffs2/os-linux.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/jffs2/os-linux.h 2006-05-03 15:05:02.000000000 +0200
@@ -165,7 +165,7 @@
/* file.c */
extern const struct file_operations jffs2_file_operations;
extern struct inode_operations jffs2_file_inode_operations;
-extern struct address_space_operations jffs2_file_address_operations;
+extern const struct address_space_operations jffs2_file_address_operations;
int jffs2_fsync(struct file *, struct dentry *, int);
int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg);
Index: linux-2.6/fs/jfs/inode.c
===================================================================
--- linux-2.6.orig/fs/jfs/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/jfs/inode.c 2006-05-03 15:05:04.000000000 +0200
@@ -305,7 +305,7 @@
offset, nr_segs, jfs_get_block, NULL);
}
-struct address_space_operations jfs_aops = {
+const struct address_space_operations jfs_aops = {
.readpage = jfs_readpage,
.readpages = jfs_readpages,
.writepage = jfs_writepage,
Index: linux-2.6/fs/jfs/jfs_inode.h
===================================================================
--- linux-2.6.orig/fs/jfs/jfs_inode.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/jfs/jfs_inode.h 2006-05-03 15:05:06.000000000 +0200
@@ -33,7 +33,7 @@
extern struct dentry *jfs_get_parent(struct dentry *dentry);
extern void jfs_set_inode_flags(struct inode *);
-extern struct address_space_operations jfs_aops;
+extern const struct address_space_operations jfs_aops;
extern struct inode_operations jfs_dir_inode_operations;
extern const struct file_operations jfs_dir_operations;
extern struct inode_operations jfs_file_inode_operations;
Index: linux-2.6/fs/jfs/jfs_metapage.c
===================================================================
--- linux-2.6.orig/fs/jfs/jfs_metapage.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/jfs/jfs_metapage.c 2006-05-03 15:05:09.000000000 +0200
@@ -587,7 +587,7 @@
metapage_releasepage(page, 0);
}
-struct address_space_operations jfs_metapage_aops = {
+const struct address_space_operations jfs_metapage_aops = {
.readpage = metapage_readpage,
.writepage = metapage_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/jfs/jfs_metapage.h
===================================================================
--- linux-2.6.orig/fs/jfs/jfs_metapage.h 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/jfs/jfs_metapage.h 2006-05-03 15:05:11.000000000 +0200
@@ -139,7 +139,7 @@
put_metapage(mp);
}
-extern struct address_space_operations jfs_metapage_aops;
+extern const struct address_space_operations jfs_metapage_aops;
/*
* This routines invalidate all pages for an extent.
Index: linux-2.6/fs/minix/inode.c
===================================================================
--- linux-2.6.orig/fs/minix/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/minix/inode.c 2006-05-03 15:05:14.000000000 +0200
@@ -335,7 +335,7 @@
{
return generic_block_bmap(mapping,block,minix_get_block);
}
-static struct address_space_operations minix_aops = {
+static const struct address_space_operations minix_aops = {
.readpage = minix_readpage,
.writepage = minix_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/ncpfs/inode.c
===================================================================
--- linux-2.6.orig/fs/ncpfs/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/ncpfs/inode.c 2006-05-03 15:05:16.000000000 +0200
@@ -105,7 +105,7 @@
extern struct dentry_operations ncp_root_dentry_operations;
#if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
-extern struct address_space_operations ncp_symlink_aops;
+extern const struct address_space_operations ncp_symlink_aops;
extern int ncp_symlink(struct inode*, struct dentry*, const char*);
#endif
Index: linux-2.6/fs/ncpfs/symlink.c
===================================================================
--- linux-2.6.orig/fs/ncpfs/symlink.c 2006-03-15 11:23:53.000000000 +0100
+++ linux-2.6/fs/ncpfs/symlink.c 2006-05-03 15:05:19.000000000 +0200
@@ -99,7 +99,7 @@
/*
* symlinks can't do much...
*/
-struct address_space_operations ncp_symlink_aops = {
+const struct address_space_operations ncp_symlink_aops = {
.readpage = ncp_symlink_readpage,
};
Index: linux-2.6/fs/nfs/file.c
===================================================================
--- linux-2.6.orig/fs/nfs/file.c 2006-04-25 15:53:07.000000000 +0200
+++ linux-2.6/fs/nfs/file.c 2006-05-03 15:05:21.000000000 +0200
@@ -328,7 +328,7 @@
return !nfs_wb_page(page->mapping->host, page);
}
-struct address_space_operations nfs_file_aops = {
+const struct address_space_operations nfs_file_aops = {
.readpage = nfs_readpage,
.readpages = nfs_readpages,
.set_page_dirty = __set_page_dirty_nobuffers,
Index: linux-2.6/fs/ntfs/aops.c
===================================================================
--- linux-2.6.orig/fs/ntfs/aops.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/ntfs/aops.c 2006-05-03 15:05:24.000000000 +0200
@@ -1544,7 +1544,7 @@
/**
* ntfs_aops - general address space operations for inodes and attributes
*/
-struct address_space_operations ntfs_aops = {
+const struct address_space_operations ntfs_aops = {
.readpage = ntfs_readpage, /* Fill page with data. */
.sync_page = block_sync_page, /* Currently, just unplugs the
disk request queue. */
@@ -1560,7 +1560,7 @@
* ntfs_mst_aops - general address space operations for mst protecteed inodes
* and attributes
*/
-struct address_space_operations ntfs_mst_aops = {
+const struct address_space_operations ntfs_mst_aops = {
.readpage = ntfs_readpage, /* Fill page with data. */
.sync_page = block_sync_page, /* Currently, just unplugs the
disk request queue. */
Index: linux-2.6/fs/ntfs/ntfs.h
===================================================================
--- linux-2.6.orig/fs/ntfs/ntfs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/ntfs/ntfs.h 2006-05-03 15:05:26.000000000 +0200
@@ -57,8 +57,8 @@
extern struct kmem_cache *ntfs_index_ctx_cache;
/* The various operations structs defined throughout the driver files. */
-extern struct address_space_operations ntfs_aops;
-extern struct address_space_operations ntfs_mst_aops;
+extern const struct address_space_operations ntfs_aops;
+extern const struct address_space_operations ntfs_mst_aops;
extern const struct file_operations ntfs_file_ops;
extern struct inode_operations ntfs_file_inode_ops;
Index: linux-2.6/fs/ocfs2/aops.c
===================================================================
--- linux-2.6.orig/fs/ocfs2/aops.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/ocfs2/aops.c 2006-05-03 15:05:29.000000000 +0200
@@ -634,7 +634,7 @@
return ret;
}
-struct address_space_operations ocfs2_aops = {
+const struct address_space_operations ocfs2_aops = {
.readpage = ocfs2_readpage,
.writepage = ocfs2_writepage,
.prepare_write = ocfs2_prepare_write,
Index: linux-2.6/fs/ocfs2/inode.h
===================================================================
--- linux-2.6.orig/fs/ocfs2/inode.h 2006-03-15 11:23:55.000000000 +0100
+++ linux-2.6/fs/ocfs2/inode.h 2006-05-03 15:05:31.000000000 +0200
@@ -114,7 +114,7 @@
extern kmem_cache_t *ocfs2_inode_cache;
-extern struct address_space_operations ocfs2_aops;
+extern const struct address_space_operations ocfs2_aops;
struct buffer_head *ocfs2_bread(struct inode *inode, int block,
int *err, int reada);
Index: linux-2.6/fs/qnx4/inode.c
===================================================================
--- linux-2.6.orig/fs/qnx4/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/qnx4/inode.c 2006-05-03 15:05:33.000000000 +0200
@@ -448,7 +448,7 @@
{
return generic_block_bmap(mapping,block,qnx4_get_block);
}
-static struct address_space_operations qnx4_aops = {
+static const struct address_space_operations qnx4_aops = {
.readpage = qnx4_readpage,
.writepage = qnx4_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/ramfs/file-mmu.c
===================================================================
--- linux-2.6.orig/fs/ramfs/file-mmu.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/ramfs/file-mmu.c 2006-05-03 15:05:36.000000000 +0200
@@ -26,7 +26,7 @@
#include <linux/fs.h>
-struct address_space_operations ramfs_aops = {
+const struct address_space_operations ramfs_aops = {
.readpage = simple_readpage,
.prepare_write = simple_prepare_write,
.commit_write = simple_commit_write
Index: linux-2.6/fs/ramfs/file-nommu.c
===================================================================
--- linux-2.6.orig/fs/ramfs/file-nommu.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/ramfs/file-nommu.c 2006-05-03 15:05:38.000000000 +0200
@@ -27,7 +27,7 @@
static int ramfs_nommu_setattr(struct dentry *, struct iattr *);
-struct address_space_operations ramfs_aops = {
+const struct address_space_operations ramfs_aops = {
.readpage = simple_readpage,
.prepare_write = simple_prepare_write,
.commit_write = simple_commit_write
Index: linux-2.6/fs/ramfs/internal.h
===================================================================
--- linux-2.6.orig/fs/ramfs/internal.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/ramfs/internal.h 2006-05-03 15:05:41.000000000 +0200
@@ -10,6 +10,6 @@
*/
-extern struct address_space_operations ramfs_aops;
+extern const struct address_space_operations ramfs_aops;
extern const struct file_operations ramfs_file_operations;
extern struct inode_operations ramfs_file_inode_operations;
Index: linux-2.6/fs/reiserfs/inode.c
===================================================================
--- linux-2.6.orig/fs/reiserfs/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/reiserfs/inode.c 2006-05-03 15:05:43.000000000 +0200
@@ -2996,7 +2996,7 @@
return error;
}
-struct address_space_operations reiserfs_address_space_operations = {
+const struct address_space_operations reiserfs_address_space_operations = {
.writepage = reiserfs_writepage,
.readpage = reiserfs_readpage,
.readpages = reiserfs_readpages,
Index: linux-2.6/fs/romfs/inode.c
===================================================================
--- linux-2.6.orig/fs/romfs/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/romfs/inode.c 2006-05-03 15:06:13.000000000 +0200
@@ -459,7 +459,7 @@
/* Mapping from our types to the kernel */
-static struct address_space_operations romfs_aops = {
+static const struct address_space_operations romfs_aops = {
.readpage = romfs_readpage
};
Index: linux-2.6/fs/smbfs/file.c
===================================================================
--- linux-2.6.orig/fs/smbfs/file.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/smbfs/file.c 2006-05-03 15:06:17.000000000 +0200
@@ -306,7 +306,7 @@
return status;
}
-struct address_space_operations smb_file_aops = {
+const struct address_space_operations smb_file_aops = {
.readpage = smb_readpage,
.writepage = smb_writepage,
.prepare_write = smb_prepare_write,
Index: linux-2.6/fs/smbfs/proto.h
===================================================================
--- linux-2.6.orig/fs/smbfs/proto.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/smbfs/proto.h 2006-05-03 15:06:21.000000000 +0200
@@ -63,7 +63,7 @@
extern int smb_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
extern int smb_notify_change(struct dentry *dentry, struct iattr *attr);
/* file.c */
-extern struct address_space_operations smb_file_aops;
+extern const struct address_space_operations smb_file_aops;
extern const struct file_operations smb_file_operations;
extern struct inode_operations smb_file_inode_operations;
/* ioctl.c */
Index: linux-2.6/fs/sysfs/inode.c
===================================================================
--- linux-2.6.orig/fs/sysfs/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/sysfs/inode.c 2006-05-03 15:06:23.000000000 +0200
@@ -16,7 +16,7 @@
extern struct super_block * sysfs_sb;
-static struct address_space_operations sysfs_aops = {
+static const struct address_space_operations sysfs_aops = {
.readpage = simple_readpage,
.prepare_write = simple_prepare_write,
.commit_write = simple_commit_write
Index: linux-2.6/fs/sysv/itree.c
===================================================================
--- linux-2.6.orig/fs/sysv/itree.c 2006-03-15 11:23:56.000000000 +0100
+++ linux-2.6/fs/sysv/itree.c 2006-05-03 15:06:26.000000000 +0200
@@ -465,7 +465,7 @@
{
return generic_block_bmap(mapping,block,get_block);
}
-struct address_space_operations sysv_aops = {
+const struct address_space_operations sysv_aops = {
.readpage = sysv_readpage,
.writepage = sysv_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/sysv/sysv.h
===================================================================
--- linux-2.6.orig/fs/sysv/sysv.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/sysv/sysv.h 2006-05-03 15:06:28.000000000 +0200
@@ -161,7 +161,7 @@
extern struct inode_operations sysv_fast_symlink_inode_operations;
extern const struct file_operations sysv_file_operations;
extern const struct file_operations sysv_dir_operations;
-extern struct address_space_operations sysv_aops;
+extern const struct address_space_operations sysv_aops;
extern struct super_operations sysv_sops;
extern struct dentry_operations sysv_dentry_operations;
Index: linux-2.6/fs/udf/file.c
===================================================================
--- linux-2.6.orig/fs/udf/file.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/udf/file.c 2006-05-03 15:06:36.000000000 +0200
@@ -95,7 +95,7 @@
return 0;
}
-struct address_space_operations udf_adinicb_aops = {
+const struct address_space_operations udf_adinicb_aops = {
.readpage = udf_adinicb_readpage,
.writepage = udf_adinicb_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/udf/inode.c
===================================================================
--- linux-2.6.orig/fs/udf/inode.c 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/udf/inode.c 2006-05-03 15:06:39.000000000 +0200
@@ -132,7 +132,7 @@
return generic_block_bmap(mapping,block,udf_get_block);
}
-struct address_space_operations udf_aops = {
+const struct address_space_operations udf_aops = {
.readpage = udf_readpage,
.writepage = udf_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/udf/symlink.c
===================================================================
--- linux-2.6.orig/fs/udf/symlink.c 2006-03-15 11:23:56.000000000 +0100
+++ linux-2.6/fs/udf/symlink.c 2006-05-03 15:06:41.000000000 +0200
@@ -113,6 +113,6 @@
/*
* symlinks can't do much...
*/
-struct address_space_operations udf_symlink_aops = {
+const struct address_space_operations udf_symlink_aops = {
.readpage = udf_symlink_filler,
};
Index: linux-2.6/fs/udf/udfdecl.h
===================================================================
--- linux-2.6.orig/fs/udf/udfdecl.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/udf/udfdecl.h 2006-05-03 15:06:44.000000000 +0200
@@ -47,9 +47,9 @@
extern const struct file_operations udf_dir_operations;
extern struct inode_operations udf_file_inode_operations;
extern const struct file_operations udf_file_operations;
-extern struct address_space_operations udf_aops;
-extern struct address_space_operations udf_adinicb_aops;
-extern struct address_space_operations udf_symlink_aops;
+extern const struct address_space_operations udf_aops;
+extern const struct address_space_operations udf_adinicb_aops;
+extern const struct address_space_operations udf_symlink_aops;
struct udf_fileident_bh
{
Index: linux-2.6/fs/ufs/inode.c
===================================================================
--- linux-2.6.orig/fs/ufs/inode.c 2006-03-15 11:23:56.000000000 +0100
+++ linux-2.6/fs/ufs/inode.c 2006-05-03 15:06:46.000000000 +0200
@@ -531,7 +531,7 @@
{
return generic_block_bmap(mapping,block,ufs_getfrag_block);
}
-struct address_space_operations ufs_aops = {
+const struct address_space_operations ufs_aops = {
.readpage = ufs_readpage,
.writepage = ufs_writepage,
.sync_page = block_sync_page,
Index: linux-2.6/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_aops.c 2006-04-25 15:53:07.000000000 +0200
+++ linux-2.6/fs/xfs/linux-2.6/xfs_aops.c 2006-05-03 15:06:49.000000000 +0200
@@ -1448,7 +1448,7 @@
block_invalidatepage(page, offset);
}
-struct address_space_operations xfs_address_space_operations = {
+const struct address_space_operations xfs_address_space_operations = {
.readpage = xfs_vm_readpage,
.readpages = xfs_vm_readpages,
.writepage = xfs_vm_writepage,
Index: linux-2.6/fs/xfs/linux-2.6/xfs_aops.h
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_aops.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/fs/xfs/linux-2.6/xfs_aops.h 2006-05-03 15:06:52.000000000 +0200
@@ -40,7 +40,7 @@
struct work_struct io_work; /* xfsdatad work queue */
} xfs_ioend_t;
-extern struct address_space_operations xfs_address_space_operations;
+extern const struct address_space_operations xfs_address_space_operations;
extern int xfs_get_blocks(struct inode *, sector_t, struct buffer_head *, int);
#endif /* __XFS_IOPS_H__ */
Index: linux-2.6/fs/xfs/linux-2.6/xfs_buf.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_buf.c 2006-04-25 15:53:07.000000000 +0200
+++ linux-2.6/fs/xfs/linux-2.6/xfs_buf.c 2006-05-03 15:07:00.000000000 +0200
@@ -1520,7 +1520,7 @@
struct backing_dev_info *bdi;
struct inode *inode;
struct address_space *mapping;
- static struct address_space_operations mapping_aops = {
+ static const struct address_space_operations mapping_aops = {
.sync_page = block_sync_page,
.migratepage = fail_migrate_page,
};
Index: linux-2.6/include/linux/coda_linux.h
===================================================================
--- linux-2.6.orig/include/linux/coda_linux.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/include/linux/coda_linux.h 2006-05-03 15:07:08.000000000 +0200
@@ -27,8 +27,8 @@
extern struct inode_operations coda_file_inode_operations;
extern struct inode_operations coda_ioctl_inode_operations;
-extern struct address_space_operations coda_file_aops;
-extern struct address_space_operations coda_symlink_aops;
+extern const struct address_space_operations coda_file_aops;
+extern const struct address_space_operations coda_symlink_aops;
extern const struct file_operations coda_dir_operations;
extern const struct file_operations coda_file_operations;
Index: linux-2.6/include/linux/efs_fs.h
===================================================================
--- linux-2.6.orig/include/linux/efs_fs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/include/linux/efs_fs.h 2006-05-03 15:07:12.000000000 +0200
@@ -38,7 +38,7 @@
extern struct inode_operations efs_dir_inode_operations;
extern const struct file_operations efs_dir_operations;
-extern struct address_space_operations efs_symlink_aops;
+extern const struct address_space_operations efs_symlink_aops;
extern void efs_read_inode(struct inode *);
extern efs_block_t efs_map_block(struct inode *, efs_block_t);
Index: linux-2.6/include/linux/fs.h
===================================================================
--- linux-2.6.orig/include/linux/fs.h 2006-04-25 15:53:07.000000000 +0200
+++ linux-2.6/include/linux/fs.h 2006-05-03 14:59:10.000000000 +0200
@@ -388,7 +388,7 @@
unsigned int truncate_count; /* Cover race condition with truncate */
unsigned long nrpages; /* number of total pages */
pgoff_t writeback_index;/* writeback starts here */
- struct address_space_operations *a_ops; /* methods */
+ const struct address_space_operations *a_ops; /* methods */
unsigned long flags; /* error bits/gfp mask */
struct backing_dev_info *backing_dev_info; /* device readahead, etc */
spinlock_t private_lock; /* for use by the address_space */
@@ -1400,7 +1400,7 @@
extern void bdput(struct block_device *);
extern struct block_device *open_by_devnum(dev_t, unsigned);
extern const struct file_operations def_blk_fops;
-extern struct address_space_operations def_blk_aops;
+extern const struct address_space_operations def_blk_aops;
extern const struct file_operations def_chr_fops;
extern const struct file_operations bad_sock_fops;
extern const struct file_operations def_fifo_fops;
Index: linux-2.6/include/linux/nfs_fs.h
===================================================================
--- linux-2.6.orig/include/linux/nfs_fs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/include/linux/nfs_fs.h 2006-05-03 15:07:24.000000000 +0200
@@ -325,7 +325,7 @@
extern struct inode_operations nfs3_file_inode_operations;
#endif /* CONFIG_NFS_V3 */
extern const struct file_operations nfs_file_operations;
-extern struct address_space_operations nfs_file_aops;
+extern const struct address_space_operations nfs_file_aops;
static inline struct rpc_cred *nfs_file_cred(struct file *file)
{
Index: linux-2.6/include/linux/reiserfs_fs.h
===================================================================
--- linux-2.6.orig/include/linux/reiserfs_fs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/include/linux/reiserfs_fs.h 2006-05-03 15:07:27.000000000 +0200
@@ -1973,7 +1973,7 @@
/* file.c */
extern struct inode_operations reiserfs_file_inode_operations;
extern const struct file_operations reiserfs_file_operations;
-extern struct address_space_operations reiserfs_address_space_operations;
+extern const struct address_space_operations reiserfs_address_space_operations;
/* fix_nodes.c */
Index: linux-2.6/include/linux/ufs_fs.h
===================================================================
--- linux-2.6.orig/include/linux/ufs_fs.h 2006-04-04 16:50:12.000000000 +0200
+++ linux-2.6/include/linux/ufs_fs.h 2006-05-03 15:07:30.000000000 +0200
@@ -897,7 +897,7 @@
extern struct inode_operations ufs_file_inode_operations;
extern const struct file_operations ufs_file_operations;
-extern struct address_space_operations ufs_aops;
+extern const struct address_space_operations ufs_aops;
/* ialloc.c */
extern void ufs_free_inode (struct inode *inode);
Index: linux-2.6/mm/filemap.c
===================================================================
--- linux-2.6.orig/mm/filemap.c 2006-04-28 19:25:49.000000000 +0200
+++ linux-2.6/mm/filemap.c 2006-05-03 15:07:39.000000000 +0200
@@ -1978,7 +1978,7 @@
{
struct file *file = iocb->ki_filp;
struct address_space * mapping = file->f_mapping;
- struct address_space_operations *a_ops = mapping->a_ops;
+ const struct address_space_operations *a_ops = mapping->a_ops;
struct inode *inode = mapping->host;
long status = 0;
struct page *page;
Index: linux-2.6/mm/filemap_xip.c
===================================================================
--- linux-2.6.orig/mm/filemap_xip.c 2006-03-15 11:24:02.000000000 +0100
+++ linux-2.6/mm/filemap_xip.c 2006-05-03 15:07:44.000000000 +0200
@@ -273,7 +273,7 @@
size_t count, loff_t pos, loff_t *ppos)
{
struct address_space * mapping = filp->f_mapping;
- struct address_space_operations *a_ops = mapping->a_ops;
+ const struct address_space_operations *a_ops = mapping->a_ops;
struct inode *inode = mapping->host;
long status = 0;
struct page *page;
Index: linux-2.6/mm/shmem.c
===================================================================
--- linux-2.6.orig/mm/shmem.c 2006-04-25 15:53:07.000000000 +0200
+++ linux-2.6/mm/shmem.c 2006-05-03 15:07:51.000000000 +0200
@@ -174,7 +174,7 @@
}
static struct super_operations shmem_ops;
-static struct address_space_operations shmem_aops;
+static const struct address_space_operations shmem_aops;
static struct file_operations shmem_file_operations;
static struct inode_operations shmem_inode_operations;
static struct inode_operations shmem_dir_inode_operations;
@@ -2168,7 +2168,7 @@
printk(KERN_INFO "shmem_inode_cache: not all structures were freed\n");
}
-static struct address_space_operations shmem_aops = {
+static const struct address_space_operations shmem_aops = {
.writepage = shmem_writepage,
.set_page_dirty = __set_page_dirty_nobuffers,
#ifdef CONFIG_TMPFS
Index: linux-2.6/mm/swap_state.c
===================================================================
--- linux-2.6.orig/mm/swap_state.c 2006-04-04 16:50:13.000000000 +0200
+++ linux-2.6/mm/swap_state.c 2006-05-03 15:07:57.000000000 +0200
@@ -24,7 +24,7 @@
* vmscan's shrink_list, to make sync_page look nicer, and to allow
* future use of radix_tree tags in the swap cache.
*/
-static struct address_space_operations swap_aops = {
+static const struct address_space_operations swap_aops = {
.writepage = swap_writepage,
.sync_page = block_sync_page,
.set_page_dirty = __set_page_dirty_nobuffers,
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mark address_space_operations const
2006-05-03 13:18 [PATCH] mark address_space_operations const Christoph Hellwig
@ 2006-05-09 5:30 ` Prasanna S Panchamukhi
2006-05-09 5:56 ` Greg KH
2006-05-09 9:13 ` Christoph Hellwig
2006-05-12 11:20 ` Andrew Morton
1 sibling, 2 replies; 7+ messages in thread
From: Prasanna S Panchamukhi @ 2006-05-09 5:30 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: akpm, linux-fsdevel, suparna, maneesh, jkenisto
On Wed, May 03, 2006 at 03:18:36PM +0200, Christoph Hellwig wrote:
> Same as with already do with the file operations:
> keep them in .rodata and prevents people from doing runtime patching.
I understand that making file operations .rodata was
to prevent binary driver authors overriding individual
file_operations members at runtime.
This patch prevents even GPL code from overriding address_space
operations. There might be in kernel users who want to override
address_space operations.
Thanks
Prasanna
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: linux-2.6/drivers/block/loop.c
> ===================================================================
> --- linux-2.6.orig/drivers/block/loop.c 2006-04-04 16:50:09.000000000 +0200
> +++ linux-2.6/drivers/block/loop.c 2006-05-03 15:01:57.000000000 +0200
> @@ -210,7 +210,7 @@
> {
> struct file *file = lo->lo_backing_file; /* kudos to NFsckingS */
> struct address_space *mapping = file->f_mapping;
> - struct address_space_operations *aops = mapping->a_ops;
> + const struct address_space_operations *aops = mapping->a_ops;
> pgoff_t index;
> unsigned offset, bv_offs;
> int len, ret;
> @@ -784,7 +784,7 @@
>
> error = -EINVAL;
> if (S_ISREG(inode->i_mode) || S_ISBLK(inode->i_mode)) {
> - struct address_space_operations *aops = mapping->a_ops;
> + const struct address_space_operations *aops = mapping->a_ops;
> /*
> * If we can't read - sorry. If we only can't write - well,
> * it's going to be read-only.
> Index: linux-2.6/drivers/block/rd.c
> ===================================================================
> --- linux-2.6.orig/drivers/block/rd.c 2006-04-04 16:50:09.000000000 +0200
> +++ linux-2.6/drivers/block/rd.c 2006-05-03 15:02:04.000000000 +0200
> @@ -191,7 +191,7 @@
> return 0;
> }
>
> -static struct address_space_operations ramdisk_aops = {
> +static const struct address_space_operations ramdisk_aops = {
> .readpage = ramdisk_readpage,
> .prepare_write = ramdisk_prepare_write,
> .commit_write = ramdisk_commit_write,
> Index: linux-2.6/fs/9p/v9fs_vfs.h
> ===================================================================
> --- linux-2.6.orig/fs/9p/v9fs_vfs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/9p/v9fs_vfs.h 2006-05-03 15:02:38.000000000 +0200
> @@ -38,7 +38,7 @@
> */
>
> extern struct file_system_type v9fs_fs_type;
> -extern struct address_space_operations v9fs_addr_operations;
> +extern const struct address_space_operations v9fs_addr_operations;
> extern const struct file_operations v9fs_file_operations;
> extern const struct file_operations v9fs_dir_operations;
> extern struct dentry_operations v9fs_dentry_operations;
> Index: linux-2.6/fs/9p/vfs_addr.c
> ===================================================================
> --- linux-2.6.orig/fs/9p/vfs_addr.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/9p/vfs_addr.c 2006-05-03 15:02:43.000000000 +0200
> @@ -103,6 +103,6 @@
> return retval;
> }
>
> -struct address_space_operations v9fs_addr_operations = {
> +const struct address_space_operations v9fs_addr_operations = {
> .readpage = v9fs_vfs_readpage,
> };
> Index: linux-2.6/fs/adfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/adfs/inode.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/adfs/inode.c 2006-05-03 15:02:47.000000000 +0200
> @@ -72,7 +72,7 @@
> return generic_block_bmap(mapping, block, adfs_get_block);
> }
>
> -static struct address_space_operations adfs_aops = {
> +static const struct address_space_operations adfs_aops = {
> .readpage = adfs_readpage,
> .writepage = adfs_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/affs/affs.h
> ===================================================================
> --- linux-2.6.orig/fs/affs/affs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/affs/affs.h 2006-05-03 15:02:53.000000000 +0200
> @@ -195,9 +195,9 @@
> extern const struct file_operations affs_file_operations;
> extern const struct file_operations affs_file_operations_ofs;
> extern const struct file_operations affs_dir_operations;
> -extern struct address_space_operations affs_symlink_aops;
> -extern struct address_space_operations affs_aops;
> -extern struct address_space_operations affs_aops_ofs;
> +extern const struct address_space_operations affs_symlink_aops;
> +extern const struct address_space_operations affs_aops;
> +extern const struct address_space_operations affs_aops_ofs;
>
> extern struct dentry_operations affs_dentry_operations;
> extern struct dentry_operations affs_dentry_operations_intl;
> Index: linux-2.6/fs/affs/file.c
> ===================================================================
> --- linux-2.6.orig/fs/affs/file.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/affs/file.c 2006-05-03 15:02:58.000000000 +0200
> @@ -406,7 +406,7 @@
> {
> return generic_block_bmap(mapping,block,affs_get_block);
> }
> -struct address_space_operations affs_aops = {
> +const struct address_space_operations affs_aops = {
> .readpage = affs_readpage,
> .writepage = affs_writepage,
> .sync_page = block_sync_page,
> @@ -759,7 +759,7 @@
> goto done;
> }
>
> -struct address_space_operations affs_aops_ofs = {
> +const struct address_space_operations affs_aops_ofs = {
> .readpage = affs_readpage_ofs,
> //.writepage = affs_writepage_ofs,
> //.sync_page = affs_sync_page_ofs,
> Index: linux-2.6/fs/affs/symlink.c
> ===================================================================
> --- linux-2.6.orig/fs/affs/symlink.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/affs/symlink.c 2006-05-03 15:03:02.000000000 +0200
> @@ -66,7 +66,7 @@
> return err;
> }
>
> -struct address_space_operations affs_symlink_aops = {
> +const struct address_space_operations affs_symlink_aops = {
> .readpage = affs_symlink_readpage,
> };
>
> Index: linux-2.6/fs/afs/file.c
> ===================================================================
> --- linux-2.6.orig/fs/afs/file.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/afs/file.c 2006-05-03 15:03:06.000000000 +0200
> @@ -35,7 +35,7 @@
> .getattr = afs_inode_getattr,
> };
>
> -struct address_space_operations afs_fs_aops = {
> +const struct address_space_operations afs_fs_aops = {
> .readpage = afs_file_readpage,
> .sync_page = block_sync_page,
> .set_page_dirty = __set_page_dirty_nobuffers,
> Index: linux-2.6/fs/afs/internal.h
> ===================================================================
> --- linux-2.6.orig/fs/afs/internal.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/afs/internal.h 2006-05-03 15:03:10.000000000 +0200
> @@ -69,7 +69,7 @@
> /*
> * file.c
> */
> -extern struct address_space_operations afs_fs_aops;
> +extern const struct address_space_operations afs_fs_aops;
> extern struct inode_operations afs_file_inode_operations;
>
> #ifdef AFS_CACHING_SUPPORT
> Index: linux-2.6/fs/befs/linuxvfs.c
> ===================================================================
> --- linux-2.6.orig/fs/befs/linuxvfs.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/befs/linuxvfs.c 2006-05-03 15:03:12.000000000 +0200
> @@ -73,7 +73,7 @@
> .lookup = befs_lookup,
> };
>
> -static struct address_space_operations befs_aops = {
> +static const struct address_space_operations befs_aops = {
> .readpage = befs_readpage,
> .sync_page = block_sync_page,
> .bmap = befs_bmap,
> Index: linux-2.6/fs/bfs/bfs.h
> ===================================================================
> --- linux-2.6.orig/fs/bfs/bfs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/bfs/bfs.h 2006-05-03 15:03:20.000000000 +0200
> @@ -50,7 +50,7 @@
> /* file.c */
> extern struct inode_operations bfs_file_inops;
> extern const struct file_operations bfs_file_operations;
> -extern struct address_space_operations bfs_aops;
> +extern const struct address_space_operations bfs_aops;
>
> /* dir.c */
> extern struct inode_operations bfs_dir_inops;
> Index: linux-2.6/fs/bfs/file.c
> ===================================================================
> --- linux-2.6.orig/fs/bfs/file.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/bfs/file.c 2006-05-03 15:03:23.000000000 +0200
> @@ -153,7 +153,7 @@
> return generic_block_bmap(mapping, block, bfs_get_block);
> }
>
> -struct address_space_operations bfs_aops = {
> +const struct address_space_operations bfs_aops = {
> .readpage = bfs_readpage,
> .writepage = bfs_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/block_dev.c
> ===================================================================
> --- linux-2.6.orig/fs/block_dev.c 2006-05-02 16:26:14.000000000 +0200
> +++ linux-2.6/fs/block_dev.c 2006-05-03 15:03:28.000000000 +0200
> @@ -1077,7 +1077,7 @@
> return blkdev_ioctl(file->f_mapping->host, file, cmd, arg);
> }
>
> -struct address_space_operations def_blk_aops = {
> +const const struct address_space_operations def_blk_aops = {
> .readpage = blkdev_readpage,
> .writepage = blkdev_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/buffer.c
> ===================================================================
> --- linux-2.6.orig/fs/buffer.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/buffer.c 2006-05-03 15:03:32.000000000 +0200
> @@ -2600,7 +2600,7 @@
> unsigned offset = from & (PAGE_CACHE_SIZE-1);
> unsigned to;
> struct page *page;
> - struct address_space_operations *a_ops = mapping->a_ops;
> + const struct address_space_operations *a_ops = mapping->a_ops;
> char *kaddr;
> int ret = 0;
>
> Index: linux-2.6/fs/cifs/cifsfs.h
> ===================================================================
> --- linux-2.6.orig/fs/cifs/cifsfs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/cifs/cifsfs.h 2006-05-03 15:03:35.000000000 +0200
> @@ -32,7 +32,7 @@
> #define TRUE 1
> #endif
>
> -extern struct address_space_operations cifs_addr_ops;
> +extern const struct address_space_operations cifs_addr_ops;
>
> /* Functions related to super block operations */
> extern struct super_operations cifs_super_ops;
> Index: linux-2.6/fs/cifs/file.c
> ===================================================================
> --- linux-2.6.orig/fs/cifs/file.c 2006-04-25 15:53:07.000000000 +0200
> +++ linux-2.6/fs/cifs/file.c 2006-05-03 15:03:38.000000000 +0200
> @@ -1944,7 +1944,7 @@
> return 0;
> }
>
> -struct address_space_operations cifs_addr_ops = {
> +const struct address_space_operations cifs_addr_ops = {
> .readpage = cifs_readpage,
> .readpages = cifs_readpages,
> .writepage = cifs_writepage,
> Index: linux-2.6/fs/coda/symlink.c
> ===================================================================
> --- linux-2.6.orig/fs/coda/symlink.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/coda/symlink.c 2006-05-03 15:03:41.000000000 +0200
> @@ -50,6 +50,6 @@
> return error;
> }
>
> -struct address_space_operations coda_symlink_aops = {
> +const struct address_space_operations coda_symlink_aops = {
> .readpage = coda_symlink_filler,
> };
> Index: linux-2.6/fs/configfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/configfs/inode.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/configfs/inode.c 2006-05-03 15:03:44.000000000 +0200
> @@ -38,7 +38,7 @@
>
> extern struct super_block * configfs_sb;
>
> -static struct address_space_operations configfs_aops = {
> +static const struct address_space_operations configfs_aops = {
> .readpage = simple_readpage,
> .prepare_write = simple_prepare_write,
> .commit_write = simple_commit_write
> Index: linux-2.6/fs/cramfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/cramfs/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/cramfs/inode.c 2006-05-03 15:03:47.000000000 +0200
> @@ -30,7 +30,7 @@
> static struct super_operations cramfs_ops;
> static struct inode_operations cramfs_dir_inode_operations;
> static const struct file_operations cramfs_directory_operations;
> -static struct address_space_operations cramfs_aops;
> +static const struct address_space_operations cramfs_aops;
>
> static DEFINE_MUTEX(read_mutex);
>
> @@ -501,7 +501,7 @@
> return 0;
> }
>
> -static struct address_space_operations cramfs_aops = {
> +static const struct address_space_operations cramfs_aops = {
> .readpage = cramfs_readpage
> };
>
> Index: linux-2.6/fs/efs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/efs/inode.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/efs/inode.c 2006-05-03 15:03:50.000000000 +0200
> @@ -21,7 +21,7 @@
> {
> return generic_block_bmap(mapping,block,efs_get_block);
> }
> -static struct address_space_operations efs_aops = {
> +static const struct address_space_operations efs_aops = {
> .readpage = efs_readpage,
> .sync_page = block_sync_page,
> .bmap = _efs_bmap
> Index: linux-2.6/fs/efs/symlink.c
> ===================================================================
> --- linux-2.6.orig/fs/efs/symlink.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/efs/symlink.c 2006-05-03 15:03:53.000000000 +0200
> @@ -53,6 +53,6 @@
> return err;
> }
>
> -struct address_space_operations efs_symlink_aops = {
> +const struct address_space_operations efs_symlink_aops = {
> .readpage = efs_symlink_readpage
> };
> Index: linux-2.6/fs/ext2/ext2.h
> ===================================================================
> --- linux-2.6.orig/fs/ext2/ext2.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/ext2/ext2.h 2006-05-03 15:03:56.000000000 +0200
> @@ -162,9 +162,9 @@
> extern const struct file_operations ext2_xip_file_operations;
>
> /* inode.c */
> -extern struct address_space_operations ext2_aops;
> -extern struct address_space_operations ext2_aops_xip;
> -extern struct address_space_operations ext2_nobh_aops;
> +extern const struct address_space_operations ext2_aops;
> +extern const struct address_space_operations ext2_aops_xip;
> +extern const struct address_space_operations ext2_nobh_aops;
>
> /* namei.c */
> extern struct inode_operations ext2_dir_inode_operations;
> Index: linux-2.6/fs/ext2/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/ext2/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/ext2/inode.c 2006-05-03 15:03:58.000000000 +0200
> @@ -684,7 +684,7 @@
> return mpage_writepages(mapping, wbc, ext2_get_block);
> }
>
> -struct address_space_operations ext2_aops = {
> +const struct address_space_operations ext2_aops = {
> .readpage = ext2_readpage,
> .readpages = ext2_readpages,
> .writepage = ext2_writepage,
> @@ -697,12 +697,12 @@
> .migratepage = buffer_migrate_page,
> };
>
> -struct address_space_operations ext2_aops_xip = {
> +const struct address_space_operations ext2_aops_xip = {
> .bmap = ext2_bmap,
> .get_xip_page = ext2_get_xip_page,
> };
>
> -struct address_space_operations ext2_nobh_aops = {
> +const struct address_space_operations ext2_nobh_aops = {
> .readpage = ext2_readpage,
> .readpages = ext2_readpages,
> .writepage = ext2_nobh_writepage,
> Index: linux-2.6/fs/ext3/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/ext3/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/ext3/inode.c 2006-05-03 15:04:01.000000000 +0200
> @@ -1696,7 +1696,7 @@
> return __set_page_dirty_nobuffers(page);
> }
>
> -static struct address_space_operations ext3_ordered_aops = {
> +static const struct address_space_operations ext3_ordered_aops = {
> .readpage = ext3_readpage,
> .readpages = ext3_readpages,
> .writepage = ext3_ordered_writepage,
> @@ -1710,7 +1710,7 @@
> .migratepage = buffer_migrate_page,
> };
>
> -static struct address_space_operations ext3_writeback_aops = {
> +static const struct address_space_operations ext3_writeback_aops = {
> .readpage = ext3_readpage,
> .readpages = ext3_readpages,
> .writepage = ext3_writeback_writepage,
> @@ -1724,7 +1724,7 @@
> .migratepage = buffer_migrate_page,
> };
>
> -static struct address_space_operations ext3_journalled_aops = {
> +static const struct address_space_operations ext3_journalled_aops = {
> .readpage = ext3_readpage,
> .readpages = ext3_readpages,
> .writepage = ext3_journalled_writepage,
> Index: linux-2.6/fs/fat/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/fat/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/fat/inode.c 2006-05-03 15:04:03.000000000 +0200
> @@ -196,7 +196,7 @@
> return generic_block_bmap(mapping, block, fat_get_block);
> }
>
> -static struct address_space_operations fat_aops = {
> +static const struct address_space_operations fat_aops = {
> .readpage = fat_readpage,
> .readpages = fat_readpages,
> .writepage = fat_writepage,
> Index: linux-2.6/fs/freevxfs/vxfs_immed.c
> ===================================================================
> --- linux-2.6.orig/fs/freevxfs/vxfs_immed.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/freevxfs/vxfs_immed.c 2006-05-03 15:04:06.000000000 +0200
> @@ -56,7 +56,7 @@
> /*
> * Adress space operations for immed files and directories.
> */
> -struct address_space_operations vxfs_immed_aops = {
> +const struct address_space_operations vxfs_immed_aops = {
> .readpage = vxfs_immed_readpage,
> };
>
> Index: linux-2.6/fs/freevxfs/vxfs_inode.c
> ===================================================================
> --- linux-2.6.orig/fs/freevxfs/vxfs_inode.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/freevxfs/vxfs_inode.c 2006-05-03 15:04:08.000000000 +0200
> @@ -41,8 +41,8 @@
> #include "vxfs_extern.h"
>
>
> -extern struct address_space_operations vxfs_aops;
> -extern struct address_space_operations vxfs_immed_aops;
> +extern const struct address_space_operations vxfs_aops;
> +extern const struct address_space_operations vxfs_immed_aops;
>
> extern struct inode_operations vxfs_immed_symlink_iops;
>
> @@ -295,7 +295,7 @@
> {
> struct super_block *sbp = ip->i_sb;
> struct vxfs_inode_info *vip;
> - struct address_space_operations *aops;
> + const struct address_space_operations *aops;
> ino_t ino = ip->i_ino;
>
> if (!(vip = __vxfs_iget(ino, VXFS_SBI(sbp)->vsi_ilist)))
> Index: linux-2.6/fs/freevxfs/vxfs_subr.c
> ===================================================================
> --- linux-2.6.orig/fs/freevxfs/vxfs_subr.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/freevxfs/vxfs_subr.c 2006-05-03 15:04:11.000000000 +0200
> @@ -42,7 +42,7 @@
> static int vxfs_readpage(struct file *, struct page *);
> static sector_t vxfs_bmap(struct address_space *, sector_t);
>
> -struct address_space_operations vxfs_aops = {
> +const struct address_space_operations vxfs_aops = {
> .readpage = vxfs_readpage,
> .bmap = vxfs_bmap,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/fuse/file.c
> ===================================================================
> --- linux-2.6.orig/fs/fuse/file.c 2006-04-25 15:53:07.000000000 +0200
> +++ linux-2.6/fs/fuse/file.c 2006-05-03 15:04:13.000000000 +0200
> @@ -642,7 +642,7 @@
> /* no mmap and sendfile */
> };
>
> -static struct address_space_operations fuse_file_aops = {
> +static const struct address_space_operations fuse_file_aops = {
> .readpage = fuse_readpage,
> .prepare_write = fuse_prepare_write,
> .commit_write = fuse_commit_write,
> Index: linux-2.6/fs/hfs/hfs_fs.h
> ===================================================================
> --- linux-2.6.orig/fs/hfs/hfs_fs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/hfs/hfs_fs.h 2006-05-03 15:04:16.000000000 +0200
> @@ -182,8 +182,8 @@
> extern int hfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
>
> /* inode.c */
> -extern struct address_space_operations hfs_aops;
> -extern struct address_space_operations hfs_btree_aops;
> +extern const struct address_space_operations hfs_aops;
> +extern const struct address_space_operations hfs_btree_aops;
>
> extern struct inode *hfs_new_inode(struct inode *, struct qstr *, int);
> extern void hfs_inode_write_fork(struct inode *, struct hfs_extent *, __be32 *, __be32 *);
> Index: linux-2.6/fs/hfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/hfs/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/hfs/inode.c 2006-05-03 15:04:18.000000000 +0200
> @@ -114,7 +114,7 @@
> return mpage_writepages(mapping, wbc, hfs_get_block);
> }
>
> -struct address_space_operations hfs_btree_aops = {
> +const struct address_space_operations hfs_btree_aops = {
> .readpage = hfs_readpage,
> .writepage = hfs_writepage,
> .sync_page = block_sync_page,
> @@ -124,7 +124,7 @@
> .releasepage = hfs_releasepage,
> };
>
> -struct address_space_operations hfs_aops = {
> +const struct address_space_operations hfs_aops = {
> .readpage = hfs_readpage,
> .writepage = hfs_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/hfsplus/hfsplus_fs.h
> ===================================================================
> --- linux-2.6.orig/fs/hfsplus/hfsplus_fs.h 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/hfsplus/hfsplus_fs.h 2006-05-03 15:04:21.000000000 +0200
> @@ -323,8 +323,8 @@
> void hfsplus_file_truncate(struct inode *);
>
> /* inode.c */
> -extern struct address_space_operations hfsplus_aops;
> -extern struct address_space_operations hfsplus_btree_aops;
> +extern const struct address_space_operations hfsplus_aops;
> +extern const struct address_space_operations hfsplus_btree_aops;
>
> void hfsplus_inode_read_fork(struct inode *, struct hfsplus_fork_raw *);
> void hfsplus_inode_write_fork(struct inode *, struct hfsplus_fork_raw *);
> Index: linux-2.6/fs/hfsplus/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/hfsplus/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/hfsplus/inode.c 2006-05-03 15:04:23.000000000 +0200
> @@ -109,7 +109,7 @@
> return mpage_writepages(mapping, wbc, hfsplus_get_block);
> }
>
> -struct address_space_operations hfsplus_btree_aops = {
> +const struct address_space_operations hfsplus_btree_aops = {
> .readpage = hfsplus_readpage,
> .writepage = hfsplus_writepage,
> .sync_page = block_sync_page,
> @@ -119,7 +119,7 @@
> .releasepage = hfsplus_releasepage,
> };
>
> -struct address_space_operations hfsplus_aops = {
> +const struct address_space_operations hfsplus_aops = {
> .readpage = hfsplus_readpage,
> .writepage = hfsplus_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/hostfs/hostfs_kern.c
> ===================================================================
> --- linux-2.6.orig/fs/hostfs/hostfs_kern.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/hostfs/hostfs_kern.c 2006-05-03 15:04:26.000000000 +0200
> @@ -54,7 +54,7 @@
>
> static struct inode_operations hostfs_iops;
> static struct inode_operations hostfs_dir_iops;
> -static struct address_space_operations hostfs_link_aops;
> +static const struct address_space_operations hostfs_link_aops;
>
> #ifndef MODULE
> static int __init hostfs_args(char *options, int *add)
> @@ -518,7 +518,7 @@
> return(err);
> }
>
> -static struct address_space_operations hostfs_aops = {
> +static const struct address_space_operations hostfs_aops = {
> .writepage = hostfs_writepage,
> .readpage = hostfs_readpage,
> .set_page_dirty = __set_page_dirty_nobuffers,
> @@ -935,7 +935,7 @@
> return(err);
> }
>
> -static struct address_space_operations hostfs_link_aops = {
> +static const struct address_space_operations hostfs_link_aops = {
> .readpage = hostfs_link_readpage,
> };
>
> Index: linux-2.6/fs/hpfs/file.c
> ===================================================================
> --- linux-2.6.orig/fs/hpfs/file.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/hpfs/file.c 2006-05-03 15:04:29.000000000 +0200
> @@ -99,7 +99,7 @@
> {
> return generic_block_bmap(mapping,block,hpfs_get_block);
> }
> -struct address_space_operations hpfs_aops = {
> +const struct address_space_operations hpfs_aops = {
> .readpage = hpfs_readpage,
> .writepage = hpfs_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/hpfs/hpfs_fn.h
> ===================================================================
> --- linux-2.6.orig/fs/hpfs/hpfs_fn.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/hpfs/hpfs_fn.h 2006-05-03 15:04:31.000000000 +0200
> @@ -268,7 +268,7 @@
> int hpfs_file_fsync(struct file *, struct dentry *, int);
> extern const struct file_operations hpfs_file_ops;
> extern struct inode_operations hpfs_file_iops;
> -extern struct address_space_operations hpfs_aops;
> +extern const struct address_space_operations hpfs_aops;
>
> /* inode.c */
>
> @@ -304,7 +304,7 @@
> /* namei.c */
>
> extern struct inode_operations hpfs_dir_iops;
> -extern struct address_space_operations hpfs_symlink_aops;
> +extern const struct address_space_operations hpfs_symlink_aops;
>
> static inline struct hpfs_inode_info *hpfs_i(struct inode *inode)
> {
> Index: linux-2.6/fs/hpfs/namei.c
> ===================================================================
> --- linux-2.6.orig/fs/hpfs/namei.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/hpfs/namei.c 2006-05-03 15:04:34.000000000 +0200
> @@ -538,7 +538,7 @@
> return err;
> }
>
> -struct address_space_operations hpfs_symlink_aops = {
> +const struct address_space_operations hpfs_symlink_aops = {
> .readpage = hpfs_symlink_readpage
> };
>
> Index: linux-2.6/fs/hugetlbfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/hugetlbfs/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/hugetlbfs/inode.c 2006-05-03 15:04:37.000000000 +0200
> @@ -34,7 +34,7 @@
> #define HUGETLBFS_MAGIC 0x958458f6
>
> static struct super_operations hugetlbfs_ops;
> -static struct address_space_operations hugetlbfs_aops;
> +static const struct address_space_operations hugetlbfs_aops;
> const struct file_operations hugetlbfs_file_operations;
> static struct inode_operations hugetlbfs_dir_inode_operations;
> static struct inode_operations hugetlbfs_inode_operations;
> @@ -549,7 +549,7 @@
> kmem_cache_free(hugetlbfs_inode_cachep, HUGETLBFS_I(inode));
> }
>
> -static struct address_space_operations hugetlbfs_aops = {
> +static const struct address_space_operations hugetlbfs_aops = {
> .readpage = hugetlbfs_readpage,
> .prepare_write = hugetlbfs_prepare_write,
> .commit_write = hugetlbfs_commit_write,
> Index: linux-2.6/fs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/inode.c 2006-05-03 15:04:39.000000000 +0200
> @@ -102,7 +102,7 @@
>
> static struct inode *alloc_inode(struct super_block *sb)
> {
> - static struct address_space_operations empty_aops;
> + static const struct address_space_operations empty_aops;
> static struct inode_operations empty_iops;
> static const struct file_operations empty_fops;
> struct inode *inode;
> Index: linux-2.6/fs/isofs/compress.c
> ===================================================================
> --- linux-2.6.orig/fs/isofs/compress.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/isofs/compress.c 2006-05-03 15:04:42.000000000 +0200
> @@ -312,7 +312,7 @@
> return err;
> }
>
> -struct address_space_operations zisofs_aops = {
> +const struct address_space_operations zisofs_aops = {
> .readpage = zisofs_readpage,
> /* No sync_page operation supported? */
> /* No bmap operation supported */
> Index: linux-2.6/fs/isofs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/isofs/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/isofs/inode.c 2006-05-03 15:04:44.000000000 +0200
> @@ -1052,7 +1052,7 @@
> return generic_block_bmap(mapping,block,isofs_get_block);
> }
>
> -static struct address_space_operations isofs_aops = {
> +static const struct address_space_operations isofs_aops = {
> .readpage = isofs_readpage,
> .sync_page = block_sync_page,
> .bmap = _isofs_bmap
> Index: linux-2.6/fs/isofs/isofs.h
> ===================================================================
> --- linux-2.6.orig/fs/isofs/isofs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/isofs/isofs.h 2006-05-03 15:04:47.000000000 +0200
> @@ -176,5 +176,5 @@
>
> extern struct inode_operations isofs_dir_inode_operations;
> extern const struct file_operations isofs_dir_operations;
> -extern struct address_space_operations isofs_symlink_aops;
> +extern const struct address_space_operations isofs_symlink_aops;
> extern struct export_operations isofs_export_ops;
> Index: linux-2.6/fs/isofs/rock.c
> ===================================================================
> --- linux-2.6.orig/fs/isofs/rock.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/isofs/rock.c 2006-05-03 15:04:51.000000000 +0200
> @@ -754,6 +754,6 @@
> return -EIO;
> }
>
> -struct address_space_operations isofs_symlink_aops = {
> +const struct address_space_operations isofs_symlink_aops = {
> .readpage = rock_ridge_symlink_readpage
> };
> Index: linux-2.6/fs/isofs/zisofs.h
> ===================================================================
> --- linux-2.6.orig/fs/isofs/zisofs.h 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/isofs/zisofs.h 2006-05-03 15:04:54.000000000 +0200
> @@ -15,7 +15,7 @@
> */
>
> #ifdef CONFIG_ZISOFS
> -extern struct address_space_operations zisofs_aops;
> +extern const struct address_space_operations zisofs_aops;
> extern int __init zisofs_init(void);
> extern void zisofs_cleanup(void);
> #endif
> Index: linux-2.6/fs/jffs/inode-v23.c
> ===================================================================
> --- linux-2.6.orig/fs/jffs/inode-v23.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/jffs/inode-v23.c 2006-05-03 15:04:56.000000000 +0200
> @@ -59,7 +59,7 @@
> static struct inode_operations jffs_file_inode_operations;
> static const struct file_operations jffs_dir_operations;
> static struct inode_operations jffs_dir_inode_operations;
> -static struct address_space_operations jffs_address_operations;
> +static const struct address_space_operations jffs_address_operations;
>
> kmem_cache_t *node_cache = NULL;
> kmem_cache_t *fm_cache = NULL;
> @@ -1614,7 +1614,7 @@
> } /* jffs_ioctl() */
>
>
> -static struct address_space_operations jffs_address_operations = {
> +static const struct address_space_operations jffs_address_operations = {
> .readpage = jffs_readpage,
> .prepare_write = jffs_prepare_write,
> .commit_write = jffs_commit_write,
> Index: linux-2.6/fs/jffs2/file.c
> ===================================================================
> --- linux-2.6.orig/fs/jffs2/file.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/jffs2/file.c 2006-05-03 15:04:59.000000000 +0200
> @@ -57,7 +57,7 @@
> .setattr = jffs2_setattr
> };
>
> -struct address_space_operations jffs2_file_address_operations =
> +const struct address_space_operations jffs2_file_address_operations =
> {
> .readpage = jffs2_readpage,
> .prepare_write =jffs2_prepare_write,
> Index: linux-2.6/fs/jffs2/os-linux.h
> ===================================================================
> --- linux-2.6.orig/fs/jffs2/os-linux.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/jffs2/os-linux.h 2006-05-03 15:05:02.000000000 +0200
> @@ -165,7 +165,7 @@
> /* file.c */
> extern const struct file_operations jffs2_file_operations;
> extern struct inode_operations jffs2_file_inode_operations;
> -extern struct address_space_operations jffs2_file_address_operations;
> +extern const struct address_space_operations jffs2_file_address_operations;
> int jffs2_fsync(struct file *, struct dentry *, int);
> int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg);
>
> Index: linux-2.6/fs/jfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/jfs/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/jfs/inode.c 2006-05-03 15:05:04.000000000 +0200
> @@ -305,7 +305,7 @@
> offset, nr_segs, jfs_get_block, NULL);
> }
>
> -struct address_space_operations jfs_aops = {
> +const struct address_space_operations jfs_aops = {
> .readpage = jfs_readpage,
> .readpages = jfs_readpages,
> .writepage = jfs_writepage,
> Index: linux-2.6/fs/jfs/jfs_inode.h
> ===================================================================
> --- linux-2.6.orig/fs/jfs/jfs_inode.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/jfs/jfs_inode.h 2006-05-03 15:05:06.000000000 +0200
> @@ -33,7 +33,7 @@
> extern struct dentry *jfs_get_parent(struct dentry *dentry);
> extern void jfs_set_inode_flags(struct inode *);
>
> -extern struct address_space_operations jfs_aops;
> +extern const struct address_space_operations jfs_aops;
> extern struct inode_operations jfs_dir_inode_operations;
> extern const struct file_operations jfs_dir_operations;
> extern struct inode_operations jfs_file_inode_operations;
> Index: linux-2.6/fs/jfs/jfs_metapage.c
> ===================================================================
> --- linux-2.6.orig/fs/jfs/jfs_metapage.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/jfs/jfs_metapage.c 2006-05-03 15:05:09.000000000 +0200
> @@ -587,7 +587,7 @@
> metapage_releasepage(page, 0);
> }
>
> -struct address_space_operations jfs_metapage_aops = {
> +const struct address_space_operations jfs_metapage_aops = {
> .readpage = metapage_readpage,
> .writepage = metapage_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/jfs/jfs_metapage.h
> ===================================================================
> --- linux-2.6.orig/fs/jfs/jfs_metapage.h 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/jfs/jfs_metapage.h 2006-05-03 15:05:11.000000000 +0200
> @@ -139,7 +139,7 @@
> put_metapage(mp);
> }
>
> -extern struct address_space_operations jfs_metapage_aops;
> +extern const struct address_space_operations jfs_metapage_aops;
>
> /*
> * This routines invalidate all pages for an extent.
> Index: linux-2.6/fs/minix/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/minix/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/minix/inode.c 2006-05-03 15:05:14.000000000 +0200
> @@ -335,7 +335,7 @@
> {
> return generic_block_bmap(mapping,block,minix_get_block);
> }
> -static struct address_space_operations minix_aops = {
> +static const struct address_space_operations minix_aops = {
> .readpage = minix_readpage,
> .writepage = minix_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/ncpfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/ncpfs/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/ncpfs/inode.c 2006-05-03 15:05:16.000000000 +0200
> @@ -105,7 +105,7 @@
>
> extern struct dentry_operations ncp_root_dentry_operations;
> #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
> -extern struct address_space_operations ncp_symlink_aops;
> +extern const struct address_space_operations ncp_symlink_aops;
> extern int ncp_symlink(struct inode*, struct dentry*, const char*);
> #endif
>
> Index: linux-2.6/fs/ncpfs/symlink.c
> ===================================================================
> --- linux-2.6.orig/fs/ncpfs/symlink.c 2006-03-15 11:23:53.000000000 +0100
> +++ linux-2.6/fs/ncpfs/symlink.c 2006-05-03 15:05:19.000000000 +0200
> @@ -99,7 +99,7 @@
> /*
> * symlinks can't do much...
> */
> -struct address_space_operations ncp_symlink_aops = {
> +const struct address_space_operations ncp_symlink_aops = {
> .readpage = ncp_symlink_readpage,
> };
>
> Index: linux-2.6/fs/nfs/file.c
> ===================================================================
> --- linux-2.6.orig/fs/nfs/file.c 2006-04-25 15:53:07.000000000 +0200
> +++ linux-2.6/fs/nfs/file.c 2006-05-03 15:05:21.000000000 +0200
> @@ -328,7 +328,7 @@
> return !nfs_wb_page(page->mapping->host, page);
> }
>
> -struct address_space_operations nfs_file_aops = {
> +const struct address_space_operations nfs_file_aops = {
> .readpage = nfs_readpage,
> .readpages = nfs_readpages,
> .set_page_dirty = __set_page_dirty_nobuffers,
> Index: linux-2.6/fs/ntfs/aops.c
> ===================================================================
> --- linux-2.6.orig/fs/ntfs/aops.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/ntfs/aops.c 2006-05-03 15:05:24.000000000 +0200
> @@ -1544,7 +1544,7 @@
> /**
> * ntfs_aops - general address space operations for inodes and attributes
> */
> -struct address_space_operations ntfs_aops = {
> +const struct address_space_operations ntfs_aops = {
> .readpage = ntfs_readpage, /* Fill page with data. */
> .sync_page = block_sync_page, /* Currently, just unplugs the
> disk request queue. */
> @@ -1560,7 +1560,7 @@
> * ntfs_mst_aops - general address space operations for mst protecteed inodes
> * and attributes
> */
> -struct address_space_operations ntfs_mst_aops = {
> +const struct address_space_operations ntfs_mst_aops = {
> .readpage = ntfs_readpage, /* Fill page with data. */
> .sync_page = block_sync_page, /* Currently, just unplugs the
> disk request queue. */
> Index: linux-2.6/fs/ntfs/ntfs.h
> ===================================================================
> --- linux-2.6.orig/fs/ntfs/ntfs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/ntfs/ntfs.h 2006-05-03 15:05:26.000000000 +0200
> @@ -57,8 +57,8 @@
> extern struct kmem_cache *ntfs_index_ctx_cache;
>
> /* The various operations structs defined throughout the driver files. */
> -extern struct address_space_operations ntfs_aops;
> -extern struct address_space_operations ntfs_mst_aops;
> +extern const struct address_space_operations ntfs_aops;
> +extern const struct address_space_operations ntfs_mst_aops;
>
> extern const struct file_operations ntfs_file_ops;
> extern struct inode_operations ntfs_file_inode_ops;
> Index: linux-2.6/fs/ocfs2/aops.c
> ===================================================================
> --- linux-2.6.orig/fs/ocfs2/aops.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/ocfs2/aops.c 2006-05-03 15:05:29.000000000 +0200
> @@ -634,7 +634,7 @@
> return ret;
> }
>
> -struct address_space_operations ocfs2_aops = {
> +const struct address_space_operations ocfs2_aops = {
> .readpage = ocfs2_readpage,
> .writepage = ocfs2_writepage,
> .prepare_write = ocfs2_prepare_write,
> Index: linux-2.6/fs/ocfs2/inode.h
> ===================================================================
> --- linux-2.6.orig/fs/ocfs2/inode.h 2006-03-15 11:23:55.000000000 +0100
> +++ linux-2.6/fs/ocfs2/inode.h 2006-05-03 15:05:31.000000000 +0200
> @@ -114,7 +114,7 @@
>
> extern kmem_cache_t *ocfs2_inode_cache;
>
> -extern struct address_space_operations ocfs2_aops;
> +extern const struct address_space_operations ocfs2_aops;
>
> struct buffer_head *ocfs2_bread(struct inode *inode, int block,
> int *err, int reada);
> Index: linux-2.6/fs/qnx4/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/qnx4/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/qnx4/inode.c 2006-05-03 15:05:33.000000000 +0200
> @@ -448,7 +448,7 @@
> {
> return generic_block_bmap(mapping,block,qnx4_get_block);
> }
> -static struct address_space_operations qnx4_aops = {
> +static const struct address_space_operations qnx4_aops = {
> .readpage = qnx4_readpage,
> .writepage = qnx4_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/ramfs/file-mmu.c
> ===================================================================
> --- linux-2.6.orig/fs/ramfs/file-mmu.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/ramfs/file-mmu.c 2006-05-03 15:05:36.000000000 +0200
> @@ -26,7 +26,7 @@
>
> #include <linux/fs.h>
>
> -struct address_space_operations ramfs_aops = {
> +const struct address_space_operations ramfs_aops = {
> .readpage = simple_readpage,
> .prepare_write = simple_prepare_write,
> .commit_write = simple_commit_write
> Index: linux-2.6/fs/ramfs/file-nommu.c
> ===================================================================
> --- linux-2.6.orig/fs/ramfs/file-nommu.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/ramfs/file-nommu.c 2006-05-03 15:05:38.000000000 +0200
> @@ -27,7 +27,7 @@
>
> static int ramfs_nommu_setattr(struct dentry *, struct iattr *);
>
> -struct address_space_operations ramfs_aops = {
> +const struct address_space_operations ramfs_aops = {
> .readpage = simple_readpage,
> .prepare_write = simple_prepare_write,
> .commit_write = simple_commit_write
> Index: linux-2.6/fs/ramfs/internal.h
> ===================================================================
> --- linux-2.6.orig/fs/ramfs/internal.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/ramfs/internal.h 2006-05-03 15:05:41.000000000 +0200
> @@ -10,6 +10,6 @@
> */
>
>
> -extern struct address_space_operations ramfs_aops;
> +extern const struct address_space_operations ramfs_aops;
> extern const struct file_operations ramfs_file_operations;
> extern struct inode_operations ramfs_file_inode_operations;
> Index: linux-2.6/fs/reiserfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/reiserfs/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/reiserfs/inode.c 2006-05-03 15:05:43.000000000 +0200
> @@ -2996,7 +2996,7 @@
> return error;
> }
>
> -struct address_space_operations reiserfs_address_space_operations = {
> +const struct address_space_operations reiserfs_address_space_operations = {
> .writepage = reiserfs_writepage,
> .readpage = reiserfs_readpage,
> .readpages = reiserfs_readpages,
> Index: linux-2.6/fs/romfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/romfs/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/romfs/inode.c 2006-05-03 15:06:13.000000000 +0200
> @@ -459,7 +459,7 @@
>
> /* Mapping from our types to the kernel */
>
> -static struct address_space_operations romfs_aops = {
> +static const struct address_space_operations romfs_aops = {
> .readpage = romfs_readpage
> };
>
> Index: linux-2.6/fs/smbfs/file.c
> ===================================================================
> --- linux-2.6.orig/fs/smbfs/file.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/smbfs/file.c 2006-05-03 15:06:17.000000000 +0200
> @@ -306,7 +306,7 @@
> return status;
> }
>
> -struct address_space_operations smb_file_aops = {
> +const struct address_space_operations smb_file_aops = {
> .readpage = smb_readpage,
> .writepage = smb_writepage,
> .prepare_write = smb_prepare_write,
> Index: linux-2.6/fs/smbfs/proto.h
> ===================================================================
> --- linux-2.6.orig/fs/smbfs/proto.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/smbfs/proto.h 2006-05-03 15:06:21.000000000 +0200
> @@ -63,7 +63,7 @@
> extern int smb_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
> extern int smb_notify_change(struct dentry *dentry, struct iattr *attr);
> /* file.c */
> -extern struct address_space_operations smb_file_aops;
> +extern const struct address_space_operations smb_file_aops;
> extern const struct file_operations smb_file_operations;
> extern struct inode_operations smb_file_inode_operations;
> /* ioctl.c */
> Index: linux-2.6/fs/sysfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/sysfs/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/sysfs/inode.c 2006-05-03 15:06:23.000000000 +0200
> @@ -16,7 +16,7 @@
>
> extern struct super_block * sysfs_sb;
>
> -static struct address_space_operations sysfs_aops = {
> +static const struct address_space_operations sysfs_aops = {
> .readpage = simple_readpage,
> .prepare_write = simple_prepare_write,
> .commit_write = simple_commit_write
> Index: linux-2.6/fs/sysv/itree.c
> ===================================================================
> --- linux-2.6.orig/fs/sysv/itree.c 2006-03-15 11:23:56.000000000 +0100
> +++ linux-2.6/fs/sysv/itree.c 2006-05-03 15:06:26.000000000 +0200
> @@ -465,7 +465,7 @@
> {
> return generic_block_bmap(mapping,block,get_block);
> }
> -struct address_space_operations sysv_aops = {
> +const struct address_space_operations sysv_aops = {
> .readpage = sysv_readpage,
> .writepage = sysv_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/sysv/sysv.h
> ===================================================================
> --- linux-2.6.orig/fs/sysv/sysv.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/sysv/sysv.h 2006-05-03 15:06:28.000000000 +0200
> @@ -161,7 +161,7 @@
> extern struct inode_operations sysv_fast_symlink_inode_operations;
> extern const struct file_operations sysv_file_operations;
> extern const struct file_operations sysv_dir_operations;
> -extern struct address_space_operations sysv_aops;
> +extern const struct address_space_operations sysv_aops;
> extern struct super_operations sysv_sops;
> extern struct dentry_operations sysv_dentry_operations;
>
> Index: linux-2.6/fs/udf/file.c
> ===================================================================
> --- linux-2.6.orig/fs/udf/file.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/udf/file.c 2006-05-03 15:06:36.000000000 +0200
> @@ -95,7 +95,7 @@
> return 0;
> }
>
> -struct address_space_operations udf_adinicb_aops = {
> +const struct address_space_operations udf_adinicb_aops = {
> .readpage = udf_adinicb_readpage,
> .writepage = udf_adinicb_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/udf/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/udf/inode.c 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/udf/inode.c 2006-05-03 15:06:39.000000000 +0200
> @@ -132,7 +132,7 @@
> return generic_block_bmap(mapping,block,udf_get_block);
> }
>
> -struct address_space_operations udf_aops = {
> +const struct address_space_operations udf_aops = {
> .readpage = udf_readpage,
> .writepage = udf_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/udf/symlink.c
> ===================================================================
> --- linux-2.6.orig/fs/udf/symlink.c 2006-03-15 11:23:56.000000000 +0100
> +++ linux-2.6/fs/udf/symlink.c 2006-05-03 15:06:41.000000000 +0200
> @@ -113,6 +113,6 @@
> /*
> * symlinks can't do much...
> */
> -struct address_space_operations udf_symlink_aops = {
> +const struct address_space_operations udf_symlink_aops = {
> .readpage = udf_symlink_filler,
> };
> Index: linux-2.6/fs/udf/udfdecl.h
> ===================================================================
> --- linux-2.6.orig/fs/udf/udfdecl.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/udf/udfdecl.h 2006-05-03 15:06:44.000000000 +0200
> @@ -47,9 +47,9 @@
> extern const struct file_operations udf_dir_operations;
> extern struct inode_operations udf_file_inode_operations;
> extern const struct file_operations udf_file_operations;
> -extern struct address_space_operations udf_aops;
> -extern struct address_space_operations udf_adinicb_aops;
> -extern struct address_space_operations udf_symlink_aops;
> +extern const struct address_space_operations udf_aops;
> +extern const struct address_space_operations udf_adinicb_aops;
> +extern const struct address_space_operations udf_symlink_aops;
>
> struct udf_fileident_bh
> {
> Index: linux-2.6/fs/ufs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/ufs/inode.c 2006-03-15 11:23:56.000000000 +0100
> +++ linux-2.6/fs/ufs/inode.c 2006-05-03 15:06:46.000000000 +0200
> @@ -531,7 +531,7 @@
> {
> return generic_block_bmap(mapping,block,ufs_getfrag_block);
> }
> -struct address_space_operations ufs_aops = {
> +const struct address_space_operations ufs_aops = {
> .readpage = ufs_readpage,
> .writepage = ufs_writepage,
> .sync_page = block_sync_page,
> Index: linux-2.6/fs/xfs/linux-2.6/xfs_aops.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_aops.c 2006-04-25 15:53:07.000000000 +0200
> +++ linux-2.6/fs/xfs/linux-2.6/xfs_aops.c 2006-05-03 15:06:49.000000000 +0200
> @@ -1448,7 +1448,7 @@
> block_invalidatepage(page, offset);
> }
>
> -struct address_space_operations xfs_address_space_operations = {
> +const struct address_space_operations xfs_address_space_operations = {
> .readpage = xfs_vm_readpage,
> .readpages = xfs_vm_readpages,
> .writepage = xfs_vm_writepage,
> Index: linux-2.6/fs/xfs/linux-2.6/xfs_aops.h
> ===================================================================
> --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_aops.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/fs/xfs/linux-2.6/xfs_aops.h 2006-05-03 15:06:52.000000000 +0200
> @@ -40,7 +40,7 @@
> struct work_struct io_work; /* xfsdatad work queue */
> } xfs_ioend_t;
>
> -extern struct address_space_operations xfs_address_space_operations;
> +extern const struct address_space_operations xfs_address_space_operations;
> extern int xfs_get_blocks(struct inode *, sector_t, struct buffer_head *, int);
>
> #endif /* __XFS_IOPS_H__ */
> Index: linux-2.6/fs/xfs/linux-2.6/xfs_buf.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_buf.c 2006-04-25 15:53:07.000000000 +0200
> +++ linux-2.6/fs/xfs/linux-2.6/xfs_buf.c 2006-05-03 15:07:00.000000000 +0200
> @@ -1520,7 +1520,7 @@
> struct backing_dev_info *bdi;
> struct inode *inode;
> struct address_space *mapping;
> - static struct address_space_operations mapping_aops = {
> + static const struct address_space_operations mapping_aops = {
> .sync_page = block_sync_page,
> .migratepage = fail_migrate_page,
> };
> Index: linux-2.6/include/linux/coda_linux.h
> ===================================================================
> --- linux-2.6.orig/include/linux/coda_linux.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/include/linux/coda_linux.h 2006-05-03 15:07:08.000000000 +0200
> @@ -27,8 +27,8 @@
> extern struct inode_operations coda_file_inode_operations;
> extern struct inode_operations coda_ioctl_inode_operations;
>
> -extern struct address_space_operations coda_file_aops;
> -extern struct address_space_operations coda_symlink_aops;
> +extern const struct address_space_operations coda_file_aops;
> +extern const struct address_space_operations coda_symlink_aops;
>
> extern const struct file_operations coda_dir_operations;
> extern const struct file_operations coda_file_operations;
> Index: linux-2.6/include/linux/efs_fs.h
> ===================================================================
> --- linux-2.6.orig/include/linux/efs_fs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/include/linux/efs_fs.h 2006-05-03 15:07:12.000000000 +0200
> @@ -38,7 +38,7 @@
>
> extern struct inode_operations efs_dir_inode_operations;
> extern const struct file_operations efs_dir_operations;
> -extern struct address_space_operations efs_symlink_aops;
> +extern const struct address_space_operations efs_symlink_aops;
>
> extern void efs_read_inode(struct inode *);
> extern efs_block_t efs_map_block(struct inode *, efs_block_t);
> Index: linux-2.6/include/linux/fs.h
> ===================================================================
> --- linux-2.6.orig/include/linux/fs.h 2006-04-25 15:53:07.000000000 +0200
> +++ linux-2.6/include/linux/fs.h 2006-05-03 14:59:10.000000000 +0200
> @@ -388,7 +388,7 @@
> unsigned int truncate_count; /* Cover race condition with truncate */
> unsigned long nrpages; /* number of total pages */
> pgoff_t writeback_index;/* writeback starts here */
> - struct address_space_operations *a_ops; /* methods */
> + const struct address_space_operations *a_ops; /* methods */
> unsigned long flags; /* error bits/gfp mask */
> struct backing_dev_info *backing_dev_info; /* device readahead, etc */
> spinlock_t private_lock; /* for use by the address_space */
> @@ -1400,7 +1400,7 @@
> extern void bdput(struct block_device *);
> extern struct block_device *open_by_devnum(dev_t, unsigned);
> extern const struct file_operations def_blk_fops;
> -extern struct address_space_operations def_blk_aops;
> +extern const struct address_space_operations def_blk_aops;
> extern const struct file_operations def_chr_fops;
> extern const struct file_operations bad_sock_fops;
> extern const struct file_operations def_fifo_fops;
> Index: linux-2.6/include/linux/nfs_fs.h
> ===================================================================
> --- linux-2.6.orig/include/linux/nfs_fs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/include/linux/nfs_fs.h 2006-05-03 15:07:24.000000000 +0200
> @@ -325,7 +325,7 @@
> extern struct inode_operations nfs3_file_inode_operations;
> #endif /* CONFIG_NFS_V3 */
> extern const struct file_operations nfs_file_operations;
> -extern struct address_space_operations nfs_file_aops;
> +extern const struct address_space_operations nfs_file_aops;
>
> static inline struct rpc_cred *nfs_file_cred(struct file *file)
> {
> Index: linux-2.6/include/linux/reiserfs_fs.h
> ===================================================================
> --- linux-2.6.orig/include/linux/reiserfs_fs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/include/linux/reiserfs_fs.h 2006-05-03 15:07:27.000000000 +0200
> @@ -1973,7 +1973,7 @@
> /* file.c */
> extern struct inode_operations reiserfs_file_inode_operations;
> extern const struct file_operations reiserfs_file_operations;
> -extern struct address_space_operations reiserfs_address_space_operations;
> +extern const struct address_space_operations reiserfs_address_space_operations;
>
> /* fix_nodes.c */
>
> Index: linux-2.6/include/linux/ufs_fs.h
> ===================================================================
> --- linux-2.6.orig/include/linux/ufs_fs.h 2006-04-04 16:50:12.000000000 +0200
> +++ linux-2.6/include/linux/ufs_fs.h 2006-05-03 15:07:30.000000000 +0200
> @@ -897,7 +897,7 @@
> extern struct inode_operations ufs_file_inode_operations;
> extern const struct file_operations ufs_file_operations;
>
> -extern struct address_space_operations ufs_aops;
> +extern const struct address_space_operations ufs_aops;
>
> /* ialloc.c */
> extern void ufs_free_inode (struct inode *inode);
> Index: linux-2.6/mm/filemap.c
> ===================================================================
> --- linux-2.6.orig/mm/filemap.c 2006-04-28 19:25:49.000000000 +0200
> +++ linux-2.6/mm/filemap.c 2006-05-03 15:07:39.000000000 +0200
> @@ -1978,7 +1978,7 @@
> {
> struct file *file = iocb->ki_filp;
> struct address_space * mapping = file->f_mapping;
> - struct address_space_operations *a_ops = mapping->a_ops;
> + const struct address_space_operations *a_ops = mapping->a_ops;
> struct inode *inode = mapping->host;
> long status = 0;
> struct page *page;
> Index: linux-2.6/mm/filemap_xip.c
> ===================================================================
> --- linux-2.6.orig/mm/filemap_xip.c 2006-03-15 11:24:02.000000000 +0100
> +++ linux-2.6/mm/filemap_xip.c 2006-05-03 15:07:44.000000000 +0200
> @@ -273,7 +273,7 @@
> size_t count, loff_t pos, loff_t *ppos)
> {
> struct address_space * mapping = filp->f_mapping;
> - struct address_space_operations *a_ops = mapping->a_ops;
> + const struct address_space_operations *a_ops = mapping->a_ops;
> struct inode *inode = mapping->host;
> long status = 0;
> struct page *page;
> Index: linux-2.6/mm/shmem.c
> ===================================================================
> --- linux-2.6.orig/mm/shmem.c 2006-04-25 15:53:07.000000000 +0200
> +++ linux-2.6/mm/shmem.c 2006-05-03 15:07:51.000000000 +0200
> @@ -174,7 +174,7 @@
> }
>
> static struct super_operations shmem_ops;
> -static struct address_space_operations shmem_aops;
> +static const struct address_space_operations shmem_aops;
> static struct file_operations shmem_file_operations;
> static struct inode_operations shmem_inode_operations;
> static struct inode_operations shmem_dir_inode_operations;
> @@ -2168,7 +2168,7 @@
> printk(KERN_INFO "shmem_inode_cache: not all structures were freed\n");
> }
>
> -static struct address_space_operations shmem_aops = {
> +static const struct address_space_operations shmem_aops = {
> .writepage = shmem_writepage,
> .set_page_dirty = __set_page_dirty_nobuffers,
> #ifdef CONFIG_TMPFS
> Index: linux-2.6/mm/swap_state.c
> ===================================================================
> --- linux-2.6.orig/mm/swap_state.c 2006-04-04 16:50:13.000000000 +0200
> +++ linux-2.6/mm/swap_state.c 2006-05-03 15:07:57.000000000 +0200
> @@ -24,7 +24,7 @@
> * vmscan's shrink_list, to make sync_page look nicer, and to allow
> * future use of radix_tree tags in the swap cache.
> */
> -static struct address_space_operations swap_aops = {
> +static const struct address_space_operations swap_aops = {
> .writepage = swap_writepage,
> .sync_page = block_sync_page,
> .set_page_dirty = __set_page_dirty_nobuffers,
> -
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Thanks & Regards
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-41776329
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mark address_space_operations const
2006-05-09 5:30 ` Prasanna S Panchamukhi
@ 2006-05-09 5:56 ` Greg KH
2006-05-09 7:24 ` Prasanna S Panchamukhi
2006-05-09 9:13 ` Christoph Hellwig
1 sibling, 1 reply; 7+ messages in thread
From: Greg KH @ 2006-05-09 5:56 UTC (permalink / raw)
To: Prasanna S Panchamukhi
Cc: Christoph Hellwig, akpm, linux-fsdevel, suparna, maneesh,
jkenisto
On Tue, May 09, 2006 at 11:00:39AM +0530, Prasanna S Panchamukhi wrote:
> On Wed, May 03, 2006 at 03:18:36PM +0200, Christoph Hellwig wrote:
> > Same as with already do with the file operations:
> > keep them in .rodata and prevents people from doing runtime patching.
>
> I understand that making file operations .rodata was
> to prevent binary driver authors overriding individual
> file_operations members at runtime.
>
> This patch prevents even GPL code from overriding address_space
> operations. There might be in kernel users who want to override
> address_space operations.
Are there any existing in-kernel users who wish to override these
operations?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mark address_space_operations const
2006-05-09 5:56 ` Greg KH
@ 2006-05-09 7:24 ` Prasanna S Panchamukhi
0 siblings, 0 replies; 7+ messages in thread
From: Prasanna S Panchamukhi @ 2006-05-09 7:24 UTC (permalink / raw)
To: Greg KH; +Cc: Christoph Hellwig, akpm, linux-fsdevel, suparna, maneesh,
jkenisto
On Mon, May 08, 2006 at 10:56:36PM -0700, Greg KH wrote:
> On Tue, May 09, 2006 at 11:00:39AM +0530, Prasanna S Panchamukhi wrote:
> > On Wed, May 03, 2006 at 03:18:36PM +0200, Christoph Hellwig wrote:
> > > Same as with already do with the file operations:
> > > keep them in .rodata and prevents people from doing runtime patching.
> >
> > I understand that making file operations .rodata was
> > to prevent binary driver authors overriding individual
> > file_operations members at runtime.
> >
> > This patch prevents even GPL code from overriding address_space
> > operations. There might be in kernel users who want to override
> > address_space operations.
>
> Are there any existing in-kernel users who wish to override these
> operations?
>
Current prototype of user-space probes uses this feature.
http://lkml.org/lkml/2006/5/9/32
Thanks
Prasanna
--
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-41776329
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mark address_space_operations const
2006-05-09 5:30 ` Prasanna S Panchamukhi
2006-05-09 5:56 ` Greg KH
@ 2006-05-09 9:13 ` Christoph Hellwig
1 sibling, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2006-05-09 9:13 UTC (permalink / raw)
To: Prasanna S Panchamukhi
Cc: Christoph Hellwig, akpm, linux-fsdevel, suparna, maneesh,
jkenisto
On Tue, May 09, 2006 at 11:00:39AM +0530, Prasanna S Panchamukhi wrote:
> I understand that making file operations .rodata was
> to prevent binary driver authors overriding individual
> file_operations members at runtime.
No, it's not. operation vectors should always be const for correctness.
Msarking them const ensures that, aswell as avoiding false cache
sharing, etc. Nothing about licenses at all.
And example for things this is supposed to prevent is the stuff you did
in the userspace probes after smoking far too much crack.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mark address_space_operations const
2006-05-03 13:18 [PATCH] mark address_space_operations const Christoph Hellwig
2006-05-09 5:30 ` Prasanna S Panchamukhi
@ 2006-05-12 11:20 ` Andrew Morton
2006-05-12 18:35 ` [PATCH] CIFS: Do not overwrite aops elements Dave Kleikamp
1 sibling, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2006-05-12 11:20 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-fsdevel, Steven French
Christoph Hellwig <hch@lst.de> wrote:
>
> Same as with already do with the file operations:
> keep them in .rodata and prevents people from doing runtime patching.
It would occasionally be nice to be the second person to compile something.
fs/cifs/inode.c: In function `cifs_get_inode_info_unix':
fs/cifs/inode.c:187: warning: assignment of read-only member `readpages'
fs/cifs/inode.c: In function `cifs_get_inode_info':
fs/cifs/inode.c:525: warning: assignment of read-only member `readpages'
Steve, you should have separate sets of a_ops and select the appropriate
one for inode->i_data.a_ops, rather than scribbling on cifs_addr_ops.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] CIFS: Do not overwrite aops elements
2006-05-12 11:20 ` Andrew Morton
@ 2006-05-12 18:35 ` Dave Kleikamp
0 siblings, 0 replies; 7+ messages in thread
From: Dave Kleikamp @ 2006-05-12 18:35 UTC (permalink / raw)
To: Andrew Morton; +Cc: Christoph Hellwig, linux-fsdevel, Steven French
On Fri, 2006-05-12 at 04:20 -0700, Andrew Morton wrote:
> Christoph Hellwig <hch@lst.de> wrote:
> >
> > Same as with already do with the file operations:
> > keep them in .rodata and prevents people from doing runtime patching.
>
> It would occasionally be nice to be the second person to compile something.
>
> fs/cifs/inode.c: In function `cifs_get_inode_info_unix':
> fs/cifs/inode.c:187: warning: assignment of read-only member `readpages'
> fs/cifs/inode.c: In function `cifs_get_inode_info':
> fs/cifs/inode.c:525: warning: assignment of read-only member `readpages'
>
> Steve, you should have separate sets of a_ops and select the appropriate
> one for inode->i_data.a_ops, rather than scribbling on cifs_addr_ops.
This patch has been compile-tested only.
cifs should not be overwriting an element of the aops structure, since
the structure is shared by all cifs inodes. Instead define a separate
aops structure to suit each purpose.
I also took the liberty of replacing a hard-coded 4096 with PAGE_CACHE_SIZE
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
diff -urp linux-2.6.17-rc4/fs/cifs/cifsfs.h linux/fs/cifs/cifsfs.h
--- linux-2.6.17-rc4/fs/cifs/cifsfs.h 2006-05-12 12:46:27.000000000 -0500
+++ linux/fs/cifs/cifsfs.h 2006-05-12 12:49:45.000000000 -0500
@@ -33,6 +33,7 @@
#endif
extern const struct address_space_operations cifs_addr_ops;
+extern const struct address_space_operations cifs_addr_ops_smallbuf;
/* Functions related to super block operations */
extern struct super_operations cifs_super_ops;
diff -urp linux-2.6.17-rc4/fs/cifs/file.c linux/fs/cifs/file.c
--- linux-2.6.17-rc4/fs/cifs/file.c 2006-05-12 12:46:27.000000000 -0500
+++ linux/fs/cifs/file.c 2006-05-12 12:50:34.000000000 -0500
@@ -1955,3 +1955,19 @@ const struct address_space_operations ci
/* .sync_page = cifs_sync_page, */
/* .direct_IO = */
};
+
+/*
+ * cifs_readpages requires the server to support a buffer large enough to
+ * contain the header plus one complete page of data. Otherwise, we need
+ * to leave cifs_readpages out of the address space operations.
+ */
+const struct address_space_operations cifs_addr_ops_smallbuf = {
+ .readpage = cifs_readpage,
+ .writepage = cifs_writepage,
+ .writepages = cifs_writepages,
+ .prepare_write = cifs_prepare_write,
+ .commit_write = cifs_commit_write,
+ .set_page_dirty = __set_page_dirty_nobuffers,
+ /* .sync_page = cifs_sync_page, */
+ /* .direct_IO = */
+};
diff -urp linux-2.6.17-rc4/fs/cifs/inode.c linux/fs/cifs/inode.c
--- linux-2.6.17-rc4/fs/cifs/inode.c 2006-05-12 10:31:20.000000000 -0500
+++ linux/fs/cifs/inode.c 2006-05-12 12:52:08.000000000 -0500
@@ -180,11 +180,12 @@ int cifs_get_inode_info_unix(struct inod
else /* not direct, send byte range locks */
inode->i_fop = &cifs_file_ops;
- inode->i_data.a_ops = &cifs_addr_ops;
/* check if server can support readpages */
if(pTcon->ses->server->maxBuf <
- 4096 + MAX_CIFS_HDR_SIZE)
- inode->i_data.a_ops->readpages = NULL;
+ PAGE_CACHE_SIZE + MAX_CIFS_HDR_SIZE)
+ inode->i_data.a_ops = &cifs_addr_ops_smallbuf;
+ else
+ inode->i_data.a_ops = &cifs_addr_ops;
} else if (S_ISDIR(inode->i_mode)) {
cFYI(1, ("Directory inode"));
inode->i_op = &cifs_dir_inode_ops;
@@ -519,10 +520,11 @@ int cifs_get_inode_info(struct inode **p
else /* not direct, send byte range locks */
inode->i_fop = &cifs_file_ops;
- inode->i_data.a_ops = &cifs_addr_ops;
if(pTcon->ses->server->maxBuf <
- 4096 + MAX_CIFS_HDR_SIZE)
- inode->i_data.a_ops->readpages = NULL;
+ PAGE_CACHE_SIZE + MAX_CIFS_HDR_SIZE)
+ inode->i_data.a_ops = &cifs_addr_ops_smallbuf;
+ else
+ inode->i_data.a_ops = &cifs_addr_ops;
} else if (S_ISDIR(inode->i_mode)) {
cFYI(1, ("Directory inode"));
inode->i_op = &cifs_dir_inode_ops;
diff -urp linux-2.6.17-rc4/fs/cifs/readdir.c linux/fs/cifs/readdir.c
--- linux-2.6.17-rc4/fs/cifs/readdir.c 2006-05-12 10:31:20.000000000 -0500
+++ linux/fs/cifs/readdir.c 2006-05-12 13:11:47.000000000 -0500
@@ -21,6 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/fs.h>
+#include <linux/pagemap.h>
#include <linux/stat.h>
#include <linux/smp_lock.h>
#include "cifspdu.h"
@@ -215,11 +216,13 @@ static void fill_in_inode(struct inode *
else
tmp_inode->i_fop = &cifs_file_ops;
- tmp_inode->i_data.a_ops = &cifs_addr_ops;
if((cifs_sb->tcon) && (cifs_sb->tcon->ses) &&
(cifs_sb->tcon->ses->server->maxBuf <
- 4096 + MAX_CIFS_HDR_SIZE))
- tmp_inode->i_data.a_ops->readpages = NULL;
+ PAGE_CACHE_SIZE + MAX_CIFS_HDR_SIZE))
+ tmp_inode->i_data.a_ops = &cifs_addr_ops_smallbuf;
+ else
+ tmp_inode->i_data.a_ops = &cifs_addr_ops;
+
if(isNewInode)
return; /* No sense invalidating pages for new inode
since have not started caching readahead file
@@ -338,11 +341,12 @@ static void unix_fill_in_inode(struct in
else
tmp_inode->i_fop = &cifs_file_ops;
- tmp_inode->i_data.a_ops = &cifs_addr_ops;
if((cifs_sb->tcon) && (cifs_sb->tcon->ses) &&
(cifs_sb->tcon->ses->server->maxBuf <
- 4096 + MAX_CIFS_HDR_SIZE))
- tmp_inode->i_data.a_ops->readpages = NULL;
+ PAGE_CACHE_SIZE + MAX_CIFS_HDR_SIZE))
+ tmp_inode->i_data.a_ops = &cifs_addr_ops_smallbuf;
+ else
+ tmp_inode->i_data.a_ops = &cifs_addr_ops;
if(isNewInode)
return; /* No sense invalidating pages for new inode since we
--
David Kleikamp
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-05-12 18:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-03 13:18 [PATCH] mark address_space_operations const Christoph Hellwig
2006-05-09 5:30 ` Prasanna S Panchamukhi
2006-05-09 5:56 ` Greg KH
2006-05-09 7:24 ` Prasanna S Panchamukhi
2006-05-09 9:13 ` Christoph Hellwig
2006-05-12 11:20 ` Andrew Morton
2006-05-12 18:35 ` [PATCH] CIFS: Do not overwrite aops elements Dave Kleikamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).