aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mm_types.h
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2011-07-14 12:48:14 -0500
committerPekka Enberg <penberg@kernel.org>2011-07-18 15:17:01 +0300
commit013e896373fc53f3d3c039364a25ccbd1fc0729a (patch)
treedf67921f753114f3e3ea326507dbc515f2852fc6 /include/linux/mm_types.h
parent3adf004d82c03ca9d57cbe960657757a71e4c2e7 (diff)
Avoid duplicate _count variables in page_struct
Restructure the union / struct cascade in struct page so that we only have one definition of _count. Tested-by: Hugh Dickins <hughd@google.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'include/linux/mm_types.h')
-rw-r--r--include/linux/mm_types.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 3d76a433d52..774b8952deb 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -49,30 +49,31 @@ struct page {
* see PAGE_MAPPING_ANON below.
*/
/* Second double word */
- union {
- struct {
+ struct {
+ union {
pgoff_t index; /* Our offset within mapping. */
- atomic_t _mapcount; /* Count of ptes mapped in mms,
+ void *freelist; /* slub first free object */
+ };
+
+ union {
+ /* Used for cmpxchg_double in slub */
+ unsigned long counters;
+
+ struct {
+
+ union {
+ atomic_t _mapcount; /* Count of ptes mapped in mms,
* to show when page is mapped
* & limit reverse map searches.
*/
- atomic_t _count; /* Usage count, see below. */
- };
- struct { /* SLUB cmpxchg_double area */
- void *freelist;
- union {
- unsigned long counters;
- struct {
- unsigned inuse:16;
- unsigned objects:15;
- unsigned frozen:1;
- /*
- * Kernel may make use of this field even when slub
- * uses the rest of the double word!
- */
- atomic_t _count;
+ struct {
+ unsigned inuse:16;
+ unsigned objects:15;
+ unsigned frozen:1;
+ };
};
+ atomic_t _count; /* Usage count, see below. */
};
};
};