diff options
author | Minchan Kim <minchan@kernel.org> | 2012-04-25 15:23:09 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-25 10:59:16 -0700 |
commit | a27545bf0bab9027e5c040901b68956551d9f63e (patch) | |
tree | 99bc548411cafd641bf2712faeff850ce23b1796 /drivers/staging/zsmalloc | |
parent | ae467dd55d9cff0e8e3535e8b353e4a686205096 (diff) | |
download | talos-obmc-linux-a27545bf0bab9027e5c040901b68956551d9f63e.tar.gz talos-obmc-linux-a27545bf0bab9027e5c040901b68956551d9f63e.zip |
zsmalloc: use PageFlag macro instead of [set|test]_bit
MM code always uses PageXXX to handle page flags.
Let's keep the consistency.
Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/zsmalloc')
-rw-r--r-- | drivers/staging/zsmalloc/zsmalloc-main.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b/drivers/staging/zsmalloc/zsmalloc-main.c index 09caa4f2687e..388fb8ba6d2a 100644 --- a/drivers/staging/zsmalloc/zsmalloc-main.c +++ b/drivers/staging/zsmalloc/zsmalloc-main.c @@ -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, @@ -371,7 +371,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; @@ -383,8 +383,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; } |