diff options
author | Christoph Hellwig <hch@lst.de> | 2006-06-28 04:26:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-28 14:59:04 -0700 |
commit | f5e54d6e53a20cef45af7499e86164f0e0d16bb2 (patch) | |
tree | cb92acbb89b84796261bf5563182261ec5654127 /fs/ext2 | |
parent | a052b68b1e7a31f1e6a721290035e9deb0f6fed9 (diff) | |
download | linux-next-f5e54d6e53a20cef45af7499e86164f0e0d16bb2.tar.gz |
[PATCH] mark address_space_operations const
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>
Diffstat (limited to 'fs/ext2')
-rw-r--r-- | fs/ext2/ext2.h | 6 | ||||
-rw-r--r-- | fs/ext2/inode.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h index 9f74a62be555..e65a019fc7a5 100644 --- a/fs/ext2/ext2.h +++ b/fs/ext2/ext2.h @@ -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; diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 04af9c45dce2..fb4d3220eb8d 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -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, |