Commit 013e8963 authored by Christoph Lameter's avatar Christoph Lameter Committed by Pekka Enberg

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: default avatarHugh Dickins <hughd@google.com>
Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 3adf004d
...@@ -49,30 +49,31 @@ struct page { ...@@ -49,30 +49,31 @@ struct page {
* see PAGE_MAPPING_ANON below. * see PAGE_MAPPING_ANON below.
*/ */
/* Second double word */ /* Second double word */
union { struct {
struct { union {
pgoff_t index; /* Our offset within mapping. */ 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 * to show when page is mapped
* & limit reverse map searches. * & limit reverse map searches.
*/ */
atomic_t _count; /* Usage count, see below. */
};
struct { /* SLUB cmpxchg_double area */ struct {
void *freelist; unsigned inuse:16;
union { unsigned objects:15;
unsigned long counters; unsigned frozen:1;
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;
}; };
atomic_t _count; /* Usage count, see below. */
}; };
}; };
}; };
......
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