summaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2012-10-08 16:32:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 16:22:45 +0900
commitb12c4ad14ee0232ad47c2bef404b6d42a3578332 (patch)
tree9fc0d3fa799b7aef83f824eb538f0b75c3af0683 /include/linux/mm.h
parentd95ea5d18e699515468368415c93ed49b1a3221b (diff)
downloadop-kernel-dev-b12c4ad14ee0232ad47c2bef404b6d42a3578332.zip
op-kernel-dev-b12c4ad14ee0232ad47c2bef404b6d42a3578332.tar.gz
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 0d5f823..4ed5c73 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -237,6 +237,18 @@ struct inode;
#define page_private(page) ((page)->private)
#define set_page_private(page, v) ((page)->private = (v))
+/* It's valid only if the page is free path or free_list */
+static inline void set_freepage_migratetype(struct page *page, int migratetype)
+{
+ set_page_private(page, migratetype);
+}
+
+/* It's valid only if the page is free path or free_list */
+static inline int get_freepage_migratetype(struct page *page)
+{
+ return page_private(page);
+}
+
/*
* FIXME: take this include out, include page-flags.h in
* files which need it (119 of them)
OpenPOWER on IntegriCloud