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 /fs/xfs | |
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 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.h | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 3e807b828e22..c40f81ba9b13 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -1454,7 +1454,7 @@ xfs_vm_invalidatepage( | |||
1454 | block_invalidatepage(page, offset); | 1454 | block_invalidatepage(page, offset); |
1455 | } | 1455 | } |
1456 | 1456 | ||
1457 | struct address_space_operations xfs_address_space_operations = { | 1457 | const struct address_space_operations xfs_address_space_operations = { |
1458 | .readpage = xfs_vm_readpage, | 1458 | .readpage = xfs_vm_readpage, |
1459 | .readpages = xfs_vm_readpages, | 1459 | .readpages = xfs_vm_readpages, |
1460 | .writepage = xfs_vm_writepage, | 1460 | .writepage = xfs_vm_writepage, |
diff --git a/fs/xfs/linux-2.6/xfs_aops.h b/fs/xfs/linux-2.6/xfs_aops.h index 706d8c781b8a..2244e516b66a 100644 --- a/fs/xfs/linux-2.6/xfs_aops.h +++ b/fs/xfs/linux-2.6/xfs_aops.h | |||
@@ -40,7 +40,7 @@ typedef struct xfs_ioend { | |||
40 | struct work_struct io_work; /* xfsdatad work queue */ | 40 | struct work_struct io_work; /* xfsdatad work queue */ |
41 | } xfs_ioend_t; | 41 | } xfs_ioend_t; |
42 | 42 | ||
43 | extern struct address_space_operations xfs_address_space_operations; | 43 | extern const struct address_space_operations xfs_address_space_operations; |
44 | extern int xfs_get_blocks(struct inode *, sector_t, struct buffer_head *, int); | 44 | extern int xfs_get_blocks(struct inode *, sector_t, struct buffer_head *, int); |
45 | 45 | ||
46 | #endif /* __XFS_AOPS_H__ */ | 46 | #endif /* __XFS_AOPS_H__ */ |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 26fed0756f01..2af528dcfb04 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -1520,7 +1520,7 @@ xfs_mapping_buftarg( | |||
1520 | struct backing_dev_info *bdi; | 1520 | struct backing_dev_info *bdi; |
1521 | struct inode *inode; | 1521 | struct inode *inode; |
1522 | struct address_space *mapping; | 1522 | struct address_space *mapping; |
1523 | static struct address_space_operations mapping_aops = { | 1523 | static const struct address_space_operations mapping_aops = { |
1524 | .sync_page = block_sync_page, | 1524 | .sync_page = block_sync_page, |
1525 | .migratepage = fail_migrate_page, | 1525 | .migratepage = fail_migrate_page, |
1526 | }; | 1526 | }; |