]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/staging/zsmalloc/zsmalloc-main.c
Merge 3.4-rc5 into staging-next
[mirror_ubuntu-artful-kernel.git] / drivers / staging / zsmalloc / zsmalloc-main.c
index 917461c66014a23252399d2f7ac974c3777a0b8f..504b6c2db22e94adf0fa529ff59e5cd7d77f8081 100644 (file)
@@ -45,12 +45,12 @@ static DEFINE_PER_CPU(struct mapping_area, zs_map_area);
 
 static int is_first_page(struct page *page)
 {
-       return test_bit(PG_private, &page->flags);
+       return PagePrivate(page);
 }
 
 static int is_last_page(struct page *page)
 {
-       return test_bit(PG_private_2, &page->flags);
+       return PagePrivate2(page);
 }
 
 static void get_zspage_mapping(struct page *page, unsigned int *class_idx,
@@ -377,7 +377,7 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags)
 
                INIT_LIST_HEAD(&page->lru);
                if (i == 0) {   /* first page */
-                       set_bit(PG_private, &page->flags);
+                       SetPagePrivate(page);
                        set_page_private(page, 0);
                        first_page = page;
                        first_page->inuse = 0;
@@ -389,8 +389,7 @@ static struct page *alloc_zspage(struct size_class *class, gfp_t flags)
                if (i >= 2)
                        list_add(&page->lru, &prev_page->lru);
                if (i == class->zspage_order - 1)       /* last page */
-                       set_bit(PG_private_2, &page->flags);
-
+                       SetPagePrivate2(page);
                prev_page = page;
        }