slab: Use page struct fields instead of casting
[platform/adaptation/renesas_rcar/renesas_kernel.git] / include / linux / mm_types.h
index dad95bd..680a5e4 100644 (file)
@@ -53,7 +53,7 @@ struct page {
        struct {
                union {
                        pgoff_t index;          /* Our offset within mapping. */
-                       void *freelist;         /* slub first free object */
+                       void *freelist;         /* slub/slob first free object */
                };
 
                union {
@@ -81,11 +81,12 @@ struct page {
                                         */
                                        atomic_t _mapcount;
 
-                                       struct {
+                                       struct { /* SLUB */
                                                unsigned inuse:16;
                                                unsigned objects:15;
                                                unsigned frozen:1;
                                        };
+                                       int units;      /* SLOB */
                                };
                                atomic_t _count;                /* Usage count, see below. */
                        };
@@ -107,6 +108,12 @@ struct page {
                        short int pobjects;
 #endif
                };
+
+               struct list_head list;  /* slobs list of pages */
+               struct {                /* slab fields */
+                       struct kmem_cache *slab_cache;
+                       struct slab *slab_page;
+               };
        };
 
        /* Remainder is not double word aligned */