[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
parent
a052b68b1e
commit
f5e54d6e53
@@ -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,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user