[PATCH] mark address_space_operations const
authorChristoph Hellwig <hch@lst.de>
Wed, 28 Jun 2006 11:26:44 +0000 (04:26 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Jun 2006 21:59:04 +0000 (14:59 -0700)
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>
Cc: Steven French <sfrench@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
89 files changed:
drivers/block/loop.c
drivers/block/rd.c
fs/9p/v9fs_vfs.h
fs/9p/vfs_addr.c
fs/adfs/inode.c
fs/affs/affs.h
fs/affs/file.c
fs/affs/symlink.c
fs/afs/file.c
fs/afs/internal.h
fs/befs/linuxvfs.c
fs/bfs/bfs.h
fs/bfs/file.c
fs/block_dev.c
fs/buffer.c
fs/cifs/cifsfs.h
fs/cifs/file.c
fs/coda/symlink.c
fs/configfs/inode.c
fs/cramfs/inode.c
fs/efs/inode.c
fs/efs/symlink.c
fs/ext2/ext2.h
fs/ext2/inode.c
fs/ext3/inode.c
fs/fat/inode.c
fs/freevxfs/vxfs_immed.c
fs/freevxfs/vxfs_inode.c
fs/freevxfs/vxfs_subr.c
fs/fuse/file.c
fs/hfs/hfs_fs.h
fs/hfs/inode.c
fs/hfsplus/hfsplus_fs.h
fs/hfsplus/inode.c
fs/hostfs/hostfs_kern.c
fs/hpfs/file.c
fs/hpfs/hpfs_fn.h
fs/hpfs/namei.c
fs/hugetlbfs/inode.c
fs/inode.c
fs/isofs/compress.c
fs/isofs/inode.c
fs/isofs/isofs.h
fs/isofs/rock.c
fs/isofs/zisofs.h
fs/jffs/inode-v23.c
fs/jffs2/file.c
fs/jffs2/os-linux.h
fs/jfs/inode.c
fs/jfs/jfs_inode.h
fs/jfs/jfs_metapage.c
fs/jfs/jfs_metapage.h
fs/minix/inode.c
fs/ncpfs/inode.c
fs/ncpfs/symlink.c
fs/nfs/file.c
fs/ntfs/aops.c
fs/ntfs/ntfs.h
fs/ocfs2/aops.c
fs/ocfs2/inode.h
fs/qnx4/inode.c
fs/ramfs/file-mmu.c
fs/ramfs/file-nommu.c
fs/ramfs/internal.h
fs/reiserfs/inode.c
fs/romfs/inode.c
fs/smbfs/file.c
fs/smbfs/proto.h
fs/sysfs/inode.c
fs/sysv/itree.c
fs/sysv/sysv.h
fs/udf/file.c
fs/udf/inode.c
fs/udf/symlink.c
fs/udf/udfdecl.h
fs/ufs/inode.c
fs/xfs/linux-2.6/xfs_aops.c
fs/xfs/linux-2.6/xfs_aops.h
fs/xfs/linux-2.6/xfs_buf.c
include/linux/coda_linux.h
include/linux/efs_fs.h
include/linux/fs.h
include/linux/nfs_fs.h
include/linux/reiserfs_fs.h
include/linux/ufs_fs.h
mm/filemap.c
mm/filemap_xip.c
mm/shmem.c
mm/swap_state.c

index 3c74ea729fc79529ed766b98f3e1d2b78bb3da57..18dd026f470dcf6d1d6d056df23d299efb2fa422 100644 (file)
@@ -210,7 +210,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec,
 {
        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 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
 
        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 940bfd7951e5c1c582a672447b65dd28ff1367c7..0378da04cfa23c0c38b967a0162aee3563119171 100644 (file)
@@ -191,7 +191,7 @@ static int ramdisk_set_page_dirty(struct page *page)
        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 f867b8d3e973a069d1d0bf21495114963e36a0a0..450b0c1b385e62f31db2d74ce6990fd67f8aeedc 100644 (file)
@@ -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 efda46fb64d9e5a0bacaa14ead4f0414e04b07f6..d4f0aa3c87f2fc2717413169d5ec651cda144aa8 100644 (file)
@@ -103,6 +103,6 @@ UnmapAndUnlock:
        return retval;
 }
 
-struct address_space_operations v9fs_addr_operations = {
+const struct address_space_operations v9fs_addr_operations = {
       .readpage = v9fs_vfs_readpage,
 };
index a02802a30798a0eefe36f52e8302f0d1b8c70a38..534f3eecc985c7b5bfe9231bd4807db4091e388d 100644 (file)
@@ -72,7 +72,7 @@ static sector_t _adfs_bmap(struct address_space *mapping, sector_t block)
        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 a43a876742b8e3b9759c7429e475bb62f5fb7e61..0ddd4cc0d1a0b598ca934b67ba6598b23bc725b7 100644 (file)
@@ -195,9 +195,9 @@ extern struct inode_operations   affs_symlink_inode_operations;
 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 7076262af39b39404c4ae2669392597934554602..3de8590e4f6a56a35d13e09be2e8a3012df2fb54 100644 (file)
@@ -406,7 +406,7 @@ static sector_t _affs_bmap(struct address_space *mapping, sector_t block)
 {
        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 @@ out:
        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 426f0f094f23b145372e3153731eb8112a172463..f802256a59330d96d537ac513f636b01a81eb79c 100644 (file)
@@ -66,7 +66,7 @@ fail:
        return err;
 }
 
-struct address_space_operations affs_symlink_aops = {
+const struct address_space_operations affs_symlink_aops = {
        .readpage       = affs_symlink_readpage,
 };
 
index 7bb716887e29b6029ea058d2c206502d1ad5605c..67d6634101fdcc81e75787c87d8084f5c13256c9 100644 (file)
@@ -35,7 +35,7 @@ struct inode_operations afs_file_inode_operations = {
        .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 72febdf9a35af9379996eb51a9167e1c085aeb8b..e88b3b65ae494a2861c8447b0592e9a7abcc353c 100644 (file)
@@ -69,7 +69,7 @@ extern const struct file_operations afs_dir_file_operations;
 /*
  * 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 08201fab26cde9e33778add4589356f931d2e1b4..a83e889a97cd7d8d79dd04fe29b5f0f43edbe890 100644 (file)
@@ -73,7 +73,7 @@ static struct inode_operations befs_dir_inode_operations = {
        .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 9d791004b21ccbf02ccc7a6d01d01a64cddf0b70..31973bbbf0574d285c71e309cbdbc36de83d0784 100644 (file)
@@ -50,7 +50,7 @@ static inline struct bfs_inode_info *BFS_I(struct inode *inode)
 /* 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 d83cd74a2e4e681a061552e8c26e22070e41efa0..3d5aca28a0a0980922c83c0b197d1cf52cb27593 100644 (file)
@@ -153,7 +153,7 @@ static sector_t bfs_bmap(struct address_space *mapping, sector_t block)
        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 028d9fb9c2d536dafad7563e36874c0e8c934d91..7f7600e2381cdafab5c360101b6c2b9573b2765d 100644 (file)
@@ -1095,7 +1095,7 @@ static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg)
        return blkdev_ioctl(file->f_mapping->host, file, cmd, arg);
 }
 
-struct address_space_operations def_blk_aops = {
+const struct address_space_operations def_blk_aops = {
        .readpage       = blkdev_readpage,
        .writepage      = blkdev_writepage,
        .sync_page      = block_sync_page,
index f23bb647db470adbe513307d6d8b70f68ac9bbbf..e9994722f4a30959019e1df6e0516f8da23b9402 100644 (file)
@@ -2598,7 +2598,7 @@ int nobh_truncate_page(struct address_space *mapping, loff_t from)
        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 a6384d83fdefb00973327aad7df52d6c82032a82..8f75c6f24701ff4e5a63f99cccb3b316830204bc 100644 (file)
@@ -32,8 +32,8 @@
 #define TRUE 1
 #endif
 
-extern struct address_space_operations cifs_addr_ops;
-extern struct address_space_operations cifs_addr_ops_smallbuf;
+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;
index e9c1573f6aa73992542d1a99d77652e2c9bf6f69..5861eb42e6260135ff491f95512e961e60c3e11a 100644 (file)
@@ -1942,7 +1942,7 @@ static int cifs_prepare_write(struct file *file, struct page *page,
        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,
@@ -1959,7 +1959,7 @@ struct address_space_operations cifs_addr_ops = {
  * contain the header plus one complete page of data.  Otherwise, we need
  * to leave cifs_readpages out of the address space operations.
  */
-struct address_space_operations cifs_addr_ops_smallbuf = {
+const struct address_space_operations cifs_addr_ops_smallbuf = {
        .readpage = cifs_readpage,
        .writepage = cifs_writepage,
        .writepages = cifs_writepages,
index b35e5bbd9c99b54047e843297d8c1e36b07bfb1e..76e00a65a75be512d0838d8d3b21e19873b1a6d1 100644 (file)
@@ -50,6 +50,6 @@ fail:
        return error;
 }
 
-struct address_space_operations coda_symlink_aops = {
+const struct address_space_operations coda_symlink_aops = {
        .readpage       = coda_symlink_filler,
 };
index c153bd9534cb6d72066094c8110ce0f35fec3ff3..e14488ca6411fef8db1fb86e1252f49b99f9b2a7 100644 (file)
@@ -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 c45d738608039c5a20a4b2055bc3dd8e4c40cfcf..223c0431042deaa8fb77aa99626100338e546f4e 100644 (file)
@@ -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 @@ static int cramfs_readpage(struct file *file, struct page * page)
        return 0;
 }
 
-static struct address_space_operations cramfs_aops = {
+static const struct address_space_operations cramfs_aops = {
        .readpage = cramfs_readpage
 };
 
index 180607f9314dc9368b2f90cbd4bac7d8542a4425..174696f9bf14eb5c803d9200b89da6e97b68b5f0 100644 (file)
@@ -21,7 +21,7 @@ static sector_t _efs_bmap(struct address_space *mapping, sector_t block)
 {
        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 3d9a350e3e7f6f8687726c7e962a55dbca39a3a8..e249cf733a6bdb9b728b664a9910dff59edb8101 100644 (file)
@@ -53,6 +53,6 @@ fail:
        return err;
 }
 
-struct address_space_operations efs_symlink_aops = {
+const struct address_space_operations efs_symlink_aops = {
        .readpage       = efs_symlink_readpage
 };
index 9f74a62be555f1cc84da03e9455d8efb27652a5e..e65a019fc7a58b87f80c64fcaa7944b06bd30242 100644 (file)
@@ -162,9 +162,9 @@ extern const struct file_operations ext2_file_operations;
 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 04af9c45dce23a0f50df3bf735a8749c092c3a85..fb4d3220eb8d717918445b13d8f920023e3a13fb 100644 (file)
@@ -684,7 +684,7 @@ ext2_writepages(struct address_space *mapping, struct writeback_control *wbc)
        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 @@ struct address_space_operations ext2_aops = {
        .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 0321e1b9034a9e71db80c43cc372402ef3371c8c..f804d5e9d60c6cc81cf35c33b42b4a8d9d2fc896 100644 (file)
@@ -1698,7 +1698,7 @@ static int ext3_journalled_set_page_dirty(struct page *page)
        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,
@@ -1712,7 +1712,7 @@ static struct address_space_operations ext3_ordered_aops = {
        .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,
@@ -1726,7 +1726,7 @@ static struct address_space_operations ext3_writeback_aops = {
        .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 7c35d582ec104c080cc5e760178b9986588f1362..31b7174176ba76798284286e8f6767419cef7e12 100644 (file)
@@ -196,7 +196,7 @@ static sector_t _fat_bmap(struct address_space *mapping, sector_t block)
        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 6f5df1700e9506b230d973ec0b88b546bd98805b..4e25f3fbed86c71d7a92722ea00bfbb82711860f 100644 (file)
@@ -56,7 +56,7 @@ struct inode_operations vxfs_immed_symlink_iops = {
 /*
  * 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 f544aae9169fb86847a0794006dde0a73910291e..ca6a39714771e317a89ad31c48e08c541438206a 100644 (file)
@@ -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 @@ vxfs_read_inode(struct inode *ip)
 {
        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 c1be118fc0670a079099909c824535b599bc7423..decac62efe570ce9f81e0522eeadcbb765da9566 100644 (file)
@@ -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 28aa81eae2cc6ddee6a2c41c5dee99254ea90f75..63614ed16336d7dec7bd4902a9c43d582e48842e 100644 (file)
@@ -770,7 +770,7 @@ static const struct file_operations fuse_direct_io_file_operations = {
        /* 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 3ed8663a8db1ea792d14d0ab9ab6d0821d2521ce..735332dfd1b8a70283d1c02b0de09b3272b485d7 100644 (file)
@@ -182,8 +182,8 @@ extern void hfs_file_truncate(struct inode *);
 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 2d4ced22201ba18d3b8e81eb5b1860d63011897b..315cf44a90b23e60a55910c484a71d661e64fbd2 100644 (file)
@@ -114,7 +114,7 @@ static int hfs_writepages(struct address_space *mapping,
        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 @@ struct address_space_operations hfs_btree_aops = {
        .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 7ae393637a0ccc688dbfd38f674123d673081471..8a1ca5ef7ada1f26468d031ee0882d61e350ca36 100644 (file)
@@ -323,8 +323,8 @@ int hfsplus_file_extend(struct inode *);
 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 acf66dba3e01ddc5256469ef5183853128107ee6..924ecdef8091fa0323ae03e62417263cbc055330 100644 (file)
@@ -109,7 +109,7 @@ static int hfsplus_writepages(struct address_space *mapping,
        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 @@ struct address_space_operations hfsplus_btree_aops = {
        .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 8e0d37743e7ce54f698e9839ebf142e0941abaff..b82e3d9c879021ae9882158aa8df2080c73f144e 100644 (file)
@@ -54,7 +54,7 @@ static int append = 0;
 
 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 @@ int hostfs_commit_write(struct file *file, struct page *page, unsigned from,
        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 @@ int hostfs_link_readpage(struct file *file, struct page *page)
        return(err);
 }
 
-static struct address_space_operations hostfs_link_aops = {
+static const struct address_space_operations hostfs_link_aops = {
        .readpage       = hostfs_link_readpage,
 };
 
index d3b9fffe45a140bedc792f9022f4af7c8f7908ce..d9eb19b7b8aecef05ef1d49d0a12feca4b184755 100644 (file)
@@ -99,7 +99,7 @@ static sector_t _hpfs_bmap(struct address_space *mapping, sector_t block)
 {
        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 29b7a3e55173e8825ed63d8f899076e045641c75..f687d54ed4422469ff43086b8b030e0b06b88e00 100644 (file)
@@ -268,7 +268,7 @@ void hpfs_set_ea(struct inode *, struct fnode *, char *, char *, int);
 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 @@ void hpfs_decide_conv(struct inode *, unsigned char *, unsigned);
 /* 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 a03abb12c610e7e535725b8c00901c928dd0626f..59e7dc182a0c760ff78631cf162313ff6b2f97d4 100644 (file)
@@ -538,7 +538,7 @@ fail:
        return err;
 }
 
-struct address_space_operations hpfs_symlink_aops = {
+const struct address_space_operations hpfs_symlink_aops = {
        .readpage       = hpfs_symlink_readpage
 };
        
index e6410d8edd0e4751a6ada441c5a8f469dcd0fd29..6449cb697967d28818016b9ee4fbbc7519202203 100644 (file)
@@ -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;
@@ -547,7 +547,7 @@ static void hugetlbfs_destroy_inode(struct inode *inode)
        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 3a2446a27d2c29c9bd6172f8f4e17b9871453d3e..f42961eb983b476f66e591939e42450eb64641d0 100644 (file)
@@ -102,7 +102,7 @@ static kmem_cache_t * inode_cachep __read_mostly;
 
 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 4917315db732e881cecbd50e89573333205d9959..3a39158cca964384e12d73bdbf9b4f7b84c645c6 100644 (file)
@@ -312,7 +312,7 @@ eio:
        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 3f9c8ba1fa1f95db3c3e622a17cefd5533087eee..bb11c7fb4019b4c8c1a860f661e704158d8a1321 100644 (file)
@@ -1054,7 +1054,7 @@ static sector_t _isofs_bmap(struct address_space *mapping, sector_t block)
        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 b87ba066f5e76f42debee19fcfb5336c896f33f9..e6308c8b57359e728be75de3e23d9e1b2cb974fb 100644 (file)
@@ -176,5 +176,5 @@ isofs_normalize_block_and_offset(struct iso_directory_record* de,
 
 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 4326cb47f8fa267667311d2b65b361aa66508858..f3a1db3098deadef58b46d7cec786d9fe8c6dae9 100644 (file)
@@ -754,6 +754,6 @@ error:
        return -EIO;
 }
 
-struct address_space_operations isofs_symlink_aops = {
+const struct address_space_operations isofs_symlink_aops = {
        .readpage = rock_ridge_symlink_readpage
 };
index d78485d101c21e203b669afe23aed5f7fcc5a771..2737957091555fd20e6cd04fd528c871e35b1187 100644 (file)
@@ -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 9e46ea6da75205e949d5d0c7d0df143c5650a4e5..93068697a9bf2cf5b8a438ea96cf72da2d59be1a 100644 (file)
@@ -59,7 +59,7 @@ static const struct file_operations jffs_file_operations;
 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(struct inode *inode, struct file *filp, unsigned int cmd,
 } /* 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 bb8844f40e48e3ecfd6327496a470ffc7bff6814..3ed6e3e120b602fb814051606dc7fc7f89edc430 100644 (file)
@@ -62,7 +62,7 @@ struct inode_operations jffs2_file_inode_operations =
        .removexattr =  jffs2_removexattr
 };
 
-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 6b522356540555c15c9cb9e37d2a8a9b317999be..9f41fc01a371b7b1a87d1eff853db3cc46d0018c 100644 (file)
@@ -158,7 +158,7 @@ extern struct inode_operations jffs2_dir_inode_operations;
 /* 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 04eb78f1252e6b70f0383d63dbb2369dd5ca70f6..43e3f566aad65fb26a4dcf92845675d561746601 100644 (file)
@@ -305,7 +305,7 @@ static ssize_t jfs_direct_IO(int rw, struct kiocb *iocb,
                                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 c300726744641869b6e4f87794b2ece81d9b8280..b5c7da6190dc0ac2364536650923941b8fa43ac8 100644 (file)
@@ -33,7 +33,7 @@ extern void jfs_free_zero_link(struct inode *);
 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 7f6e88039700c085b09188b8ad350aaecc5b6733..e1e0a6e6ebdfb8d0e1c591a124a249e908fb2174 100644 (file)
@@ -577,7 +577,7 @@ static void metapage_invalidatepage(struct page *page, unsigned long offset)
        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 f0b7d3282b07397f49d61d65448d1778caf4173b..d17a3290f5aab901253c0f2d43b136a237dc893d 100644 (file)
@@ -139,7 +139,7 @@ static inline void metapage_homeok(struct metapage *mp)
        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 a6fb509b7341153e729112c8d28fadca1fae2dfd..9ea91c5eeb7b27af1cd054c1887d514dc63db1f2 100644 (file)
@@ -335,7 +335,7 @@ static sector_t minix_bmap(struct address_space *mapping, sector_t block)
 {
        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 90d2ea28f333dfef1695c1a4a228934455383618..6c51c1198464efff9de569e5c98228b93206cf94 100644 (file)
@@ -105,7 +105,7 @@ static struct super_operations ncp_sops =
 
 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 e935f1b34bc2935e589979ee69c32a2fada36863..f76b1392a012cbc291de7284437d862dc0c7a253 100644 (file)
@@ -99,7 +99,7 @@ fail:
 /*
  * 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 add289138836d9cab60a7687f79ac40f09af19f6..cc2b874ad5a4c38f4c63c0fe4b24028bbec6b030 100644 (file)
@@ -315,7 +315,7 @@ static int nfs_release_page(struct page *page, gfp_t gfp)
        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 580412d330cb9187035d037d9259e52222f0f87f..bc579bfdfbd8ff0c09c701a849b8b61c362b0fa0 100644 (file)
@@ -1544,7 +1544,7 @@ err_out:
 /**
  * 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 @@ struct address_space_operations ntfs_aops = {
  * 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 bf7b3d7c09303a17de113173b80b2b8890d97ecb..ddd3d503097c081e42176abb5fd494864fcf56c4 100644 (file)
@@ -57,8 +57,8 @@ extern struct kmem_cache *ntfs_attr_ctx_cache;
 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 47152bf9a7f26cdfb82cd02240e5546ba3e47485..cca71317b6d6144e5bd381bacb9149a6f9fddde5 100644 (file)
@@ -666,7 +666,7 @@ out:
        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 84c5079612870bae7ba80aa5e8831a63564687d9..35140f6cf840eedbfde59f23515e8342f9c9ab7a 100644 (file)
@@ -114,7 +114,7 @@ static inline struct ocfs2_inode_info *OCFS2_I(struct inode *inode)
 
 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 2f24c46f72a1bdc19b21062c78cfb07838a67151..8bc182a88748a91abbdc7b46032d81ac5c9ad9fa 100644 (file)
@@ -450,7 +450,7 @@ static sector_t qnx4_bmap(struct address_space *mapping, sector_t block)
 {
        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 00a933eb820c27127cc330adbca12e6518deb4d8..86f14cacf64120569f2fd0ad8e6ee573de98eb4e 100644 (file)
@@ -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 f443a84b98a5a300b21fbf298f7aa2587e6e83eb..99fffc9e1bfd6ebf4959ac6415d8e80e19deff56 100644 (file)
@@ -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 313237631b49dda2c66145fcc0bab146cc5472aa..c2bb58e74653351797d75c654b855b1fa72b4ed5 100644 (file)
@@ -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 9857e50f85e723c00637ce6e26604cf8f07b6e7b..a24858a632fab85ef57f3ebf291a8a2235f2f182 100644 (file)
@@ -2996,7 +2996,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)
        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 283fbc6b8eea3776a685135d899ffc7daddaac3e..22eed61ebf693dd70c51c1bebe1938d2ffb0f528 100644 (file)
@@ -459,7 +459,7 @@ err_out:
 
 /* 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 ed9a24d19d7d312ed5336c7d0873a059e3c804fb..dae67048baba345fcbd6358e4a84fd890f834633 100644 (file)
@@ -306,7 +306,7 @@ static int smb_commit_write(struct file *file, struct page *page,
        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 972ed7dad388c3bc9c1075e36a61bced30ded427..34fb462b23795c63581648ab69149faaf7bedfd4 100644 (file)
@@ -63,7 +63,7 @@ extern int smb_revalidate_inode(struct dentry *dentry);
 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 f0b347bd12ca52d6636b2cadae31a7f45f2067a7..5e0e31cc46f5e269ebb8ed5c2fddec10f240e512 100644 (file)
@@ -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 86f5f8d43d0f6debbfcd26ba292140cfe4fed0d9..f2bcccd1d6fcf42fb9ac5db739eaf33d2ad43fc4 100644 (file)
@@ -465,7 +465,7 @@ static sector_t sysv_bmap(struct address_space *mapping, sector_t block)
 {
        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 393a480e4deb0860190a1bda62d37178d2846d85..9dcc82120935baba74960a691fc0ef15d2b1009b 100644 (file)
@@ -161,7 +161,7 @@ extern struct inode_operations sysv_dir_inode_operations;
 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 e34b00e303f13ae9cdd75d35a3649b6346b5c027..a59e5f33daf6f7ed5225d8f85c349acbf29f05ab 100644 (file)
@@ -95,7 +95,7 @@ static int udf_adinicb_commit_write(struct file *file, struct page *page, unsign
        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 2983afd5e7fd4932ca77cd24e95041f94b719062..605f5111b6d86a100430897877f170c2b59248e7 100644 (file)
@@ -132,7 +132,7 @@ static sector_t udf_bmap(struct address_space *mapping, sector_t block)
        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 674bb40edc839475cb4bdf5f1fd3b789808ee144..ba068a7865630bb07a8f968a91d20c13245c143f 100644 (file)
@@ -113,6 +113,6 @@ out:
 /*
  * 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 023e19ba5a2ee8be3d2f4df434564aa70a5f1dc8..2f992387cc9ed0a9cba2bd64c704d2e175f78fe2 100644 (file)
@@ -47,9 +47,9 @@ extern struct inode_operations udf_dir_inode_operations;
 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 259bd196099d5c4128b41be2d144c16011ea1981..8e1f90e420400af82bf963354013d5f4cb62a845 100644 (file)
@@ -574,7 +574,7 @@ static sector_t ufs_bmap(struct address_space *mapping, sector_t block)
 {
        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 3e807b828e221464131d088367496f86f54bb033..c40f81ba9b130426125228e5bfac38d7059bfd1e 100644 (file)
@@ -1454,7 +1454,7 @@ xfs_vm_invalidatepage(
        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 706d8c781b8a54b474f7a3d5ecb23a42bf8e8352..2244e516b66a339600830928682a7155df931639 100644 (file)
@@ -40,7 +40,7 @@ typedef struct xfs_ioend {
        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_AOPS_H__ */
index 26fed0756f0100b5c2e2aec31eb5e1f5853c9ed4..2af528dcfb0428ca93f2a5dced879e400682b876 100644 (file)
@@ -1520,7 +1520,7 @@ xfs_mapping_buftarg(
        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 7b5c5df5cb69213ab7c2b5e45f1939c2b2ddc8b5..be512cc98791a31b85c0317e6f2b19e1e90c3631 100644 (file)
@@ -27,8 +27,8 @@ extern struct inode_operations coda_dir_inode_operations;
 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 fbfa6b52e2fb0007a3ec29b7a003fc3981981d19..278ef4495819509748a2e1b3c53651202bbcf1f9 100644 (file)
@@ -38,7 +38,7 @@ struct statfs;
 
 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 2d8b348c11923ad57d803982040c3563bf612e52..e04a5cfe874f978c91efbaa3bfe5ac71d259aefe 100644 (file)
@@ -392,7 +392,7 @@ struct address_space {
        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 */
@@ -1405,7 +1405,7 @@ extern void bd_forget(struct inode *inode);
 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 0a1740b2532ebfe417d9adbdc8703d39d24cca1e..d90b1bb3756305d71303de5e726636fa9f3cdfe1 100644 (file)
@@ -335,7 +335,7 @@ extern struct inode_operations nfs_file_inode_operations;
 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 5676c4210e2c186d23548072abaf39d5885d4874..daa2d83cefe832a541f6e3ec1f5bd62f01b34c56 100644 (file)
@@ -1973,7 +1973,7 @@ void reiserfs_unmap_buffer(struct buffer_head *);
 /* 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 914f911325be9483cc29ab481f3014e0e27df879..e39b7cc433902565d9b7aa5d450f5be86a10118b 100644 (file)
@@ -966,7 +966,7 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de,
 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 d504d6e98886f2d0d2f5307c7bbe962b8af41e72..4082b3b3cea761693d563c523129bf80128f577b 100644 (file)
@@ -2069,7 +2069,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
 {
        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;
@@ -2219,7 +2219,7 @@ __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov,
                                unsigned long nr_segs, loff_t *ppos)
 {
        struct file *file = iocb->ki_filp;
-       struct address_space * mapping = file->f_mapping;
+       const struct address_space * mapping = file->f_mapping;
        size_t ocount;          /* original count */
        size_t count;           /* after file limit checks */
        struct inode    *inode = mapping->host;
index b960ac8e5918dcb33e64b9b4f822f25540ddb4b4..b4fd0d7c9bfb23e08e2380d9b06bca14de4a95e7 100644 (file)
@@ -273,7 +273,7 @@ __xip_file_write(struct file *filp, const char __user *buf,
                  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 38bc3334f2633a4bfe9ed0e40361d075ec35d8ec..ea64c07cbe72b036c4e58bc37bad35cce892213b 100644 (file)
@@ -174,7 +174,7 @@ static inline void shmem_unacct_blocks(unsigned long flags, long pages)
 }
 
 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;
@@ -2162,7 +2162,7 @@ static void destroy_inodecache(void)
                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 e0e1583f32c26cc2579554a4abcc797a9a671553..7535211bb495c9f54a3ece2e37feaa4c0589162d 100644 (file)
@@ -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,