[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>
This commit is contained in:

committed by
Linus Torvalds

父節點
a052b68b1e
當前提交
f5e54d6e53
@@ -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;
|
||||
|
@@ -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,
|
||||
|
@@ -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,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user