diff options
Diffstat (limited to 'include/linux/mm_inline.h')
| -rw-r--r-- | include/linux/mm_inline.h | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 650f31eabdb..8f7d24712dc 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h @@ -1,6 +1,8 @@  #ifndef LINUX_MM_INLINE_H  #define LINUX_MM_INLINE_H +#include <linux/huge_mm.h> +  /**   * page_is_file_cache - should the page be on a file LRU or anon LRU?   * @page: the page to test @@ -24,7 +26,7 @@ __add_page_to_lru_list(struct zone *zone, struct page *page, enum lru_list l,  		       struct list_head *head)  {  	list_add(&page->lru, head); -	__inc_zone_state(zone, NR_LRU_BASE + l); +	__mod_zone_page_state(zone, NR_LRU_BASE + l, hpage_nr_pages(page));  	mem_cgroup_add_lru_list(page, l);  } @@ -38,7 +40,7 @@ static inline void  del_page_from_lru_list(struct zone *zone, struct page *page, enum lru_list l)  {  	list_del(&page->lru); -	__dec_zone_state(zone, NR_LRU_BASE + l); +	__mod_zone_page_state(zone, NR_LRU_BASE + l, -hpage_nr_pages(page));  	mem_cgroup_del_lru_list(page, l);  } @@ -73,7 +75,7 @@ del_page_from_lru(struct zone *zone, struct page *page)  			l += LRU_ACTIVE;  		}  	} -	__dec_zone_state(zone, NR_LRU_BASE + l); +	__mod_zone_page_state(zone, NR_LRU_BASE + l, -hpage_nr_pages(page));  	mem_cgroup_del_lru_list(page, l);  }  |