diff options
author | Christoph Hellwig <hch@lst.de> | 2006-06-28 07:26:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-28 17:59:04 -0400 |
commit | f5e54d6e53a20cef45af7499e86164f0e0d16bb2 (patch) | |
tree | cb92acbb89b84796261bf5563182261ec5654127 /mm/filemap.c | |
parent | a052b68b1e7a31f1e6a721290035e9deb0f6fed9 (diff) |
[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 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index d504d6e98886..4082b3b3cea7 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -2069,7 +2069,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov, | |||
2069 | { | 2069 | { |
2070 | struct file *file = iocb->ki_filp; | 2070 | struct file *file = iocb->ki_filp; |
2071 | struct address_space * mapping = file->f_mapping; | 2071 | struct address_space * mapping = file->f_mapping; |
2072 | struct address_space_operations *a_ops = mapping->a_ops; | 2072 | const struct address_space_operations *a_ops = mapping->a_ops; |
2073 | struct inode *inode = mapping->host; | 2073 | struct inode *inode = mapping->host; |
2074 | long status = 0; | 2074 | long status = 0; |
2075 | struct page *page; | 2075 | struct page *page; |
@@ -2219,7 +2219,7 @@ __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov, | |||
2219 | unsigned long nr_segs, loff_t *ppos) | 2219 | unsigned long nr_segs, loff_t *ppos) |
2220 | { | 2220 | { |
2221 | struct file *file = iocb->ki_filp; | 2221 | struct file *file = iocb->ki_filp; |
2222 | struct address_space * mapping = file->f_mapping; | 2222 | const struct address_space * mapping = file->f_mapping; |
2223 | size_t ocount; /* original count */ | 2223 | size_t ocount; /* original count */ |
2224 | size_t count; /* after file limit checks */ | 2224 | size_t count; /* after file limit checks */ |
2225 | struct inode *inode = mapping->host; | 2225 | struct inode *inode = mapping->host; |