Commit 41b9c68d authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

[PATCH] anon cris align address_space

CRIS does not demand alignment, so PageAnon's PAGE_MAPPING_ANON bit got
mixed up with the low bit of the struct address_space *mapping pointer.

Patch based on that from Mikael Starvik, but moved the alignment to the
declaration of struct address_space itself, and align to sizeof(long) so
it's well-aligned on all architectures.
Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0c751b9b
...@@ -348,7 +348,12 @@ struct address_space { ...@@ -348,7 +348,12 @@ struct address_space {
spinlock_t private_lock; /* for use by the address_space */ spinlock_t private_lock; /* for use by the address_space */
struct list_head private_list; /* ditto */ struct list_head private_list; /* ditto */
struct address_space *assoc_mapping; /* ditto */ struct address_space *assoc_mapping; /* ditto */
}; } __attribute__((aligned(sizeof(long))));
/*
* On most architectures that alignment is already the case; but
* must be enforced here for CRIS, to let the least signficant bit
* of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON.
*/
struct block_device { struct block_device {
dev_t bd_dev; /* not a kdev_t - it's a search key */ dev_t bd_dev; /* not a kdev_t - it's a search key */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment