From 883c92ec4db23b20b7ce682e147d87819c20bb3b Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Mon, 28 Apr 2008 02:12:07 -0700 Subject: [PATCH] --- yaml --- r: 93975 b: refs/heads/master c: ddc81ed2c5d47a078a3b02c5c3a4345bc2bc3c9b h: refs/heads/master i: 93973: 30578d5338dc65250da367d9c8f02cd1cda72741 93971: 1d6c1f06e942edfbf3302d60e6b2300dde0d52a9 93967: 4f673254a82719c40ed06af804df80e8c113e211 v: v3 --- [refs] | 2 +- trunk/include/linux/mmzone.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 5725a91eeeb4..74d9057f8d79 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 488514d1798289f56f80ed018e246179fe500383 +refs/heads/master: ddc81ed2c5d47a078a3b02c5c3a4345bc2bc3c9b diff --git a/trunk/include/linux/mmzone.h b/trunk/include/linux/mmzone.h index 9f274a687c7e..451eaa13bc28 100644 --- a/trunk/include/linux/mmzone.h +++ b/trunk/include/linux/mmzone.h @@ -637,9 +637,10 @@ static inline int is_normal_idx(enum zone_type idx) static inline int is_highmem(struct zone *zone) { #ifdef CONFIG_HIGHMEM - int zone_idx = zone - zone->zone_pgdat->node_zones; - return zone_idx == ZONE_HIGHMEM || - (zone_idx == ZONE_MOVABLE && zone_movable_is_highmem()); + int zone_off = (char *)zone - (char *)zone->zone_pgdat->node_zones; + return zone_off == ZONE_HIGHMEM * sizeof(*zone) || + (zone_off == ZONE_MOVABLE * sizeof(*zone) && + zone_movable_is_highmem()); #else return 0; #endif