提交 acc50c11 编写于 作者: J Johannes Weiner 提交者: Linus Torvalds

mm: page_alloc: catch out-of-date list of page flag names

String tables with names of enum items are always prone to go out of
sync with the enums themselves.  Ensure during compile time that the
name table of page flags has the same size as the page flags enum.
Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
Cc: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 be9cd873
......@@ -5985,6 +5985,8 @@ static void dump_page_flags(unsigned long flags)
unsigned long mask;
int i;
BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) - 1 != __NR_PAGEFLAGS);
printk(KERN_ALERT "page flags: %#lx(", flags);
/* remove zone id */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册