aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2012-10-08 19:32:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 03:22:45 -0400
commitb12c4ad14ee0232ad47c2bef404b6d42a3578332 (patch)
tree9fc0d3fa799b7aef83f824eb538f0b75c3af0683 /include/linux/mm.h
parentd95ea5d18e699515468368415c93ed49b1a3221b (diff)
mm: page_alloc: use get_freepage_migratetype() instead of page_private()
The page allocator uses set_page_private and page_private for handling migratetype when it frees page. Let's replace them with [set|get] _freepage_migratetype to make it more clear. Signed-off-by: Minchan Kim <minchan@kernel.org> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Acked-by: Mel Gorman <mgorman@suse.de> Cc: Xishi Qiu <qiuxishi@huawei.com> Cc: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 0d5f823ce3fc..4ed5c7367b9b 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -237,6 +237,18 @@ struct inode;
237#define page_private(page) ((page)->private) 237#define page_private(page) ((page)->private)
238#define set_page_private(page, v) ((page)->private = (v)) 238#define set_page_private(page, v) ((page)->private = (v))
239 239
240/* It's valid only if the page is free path or free_list */
241static inline void set_freepage_migratetype(struct page *page, int migratetype)
242{
243 set_page_private(page, migratetype);
244}
245
246/* It's valid only if the page is free path or free_list */
247static inline int get_freepage_migratetype(struct page *page)
248{
249 return page_private(page);
250}
251
240/* 252/*
241 * FIXME: take this include out, include page-flags.h in 253 * FIXME: take this include out, include page-flags.h in
242 * files which need it (119 of them) 254 * files which need it (119 of them)