提交 617d2214 编写于 作者: N Nick Piggin 提交者: Linus Torvalds

[PATCH] mm: optimise page_count

Optimise page_count compound page test and make it consistent with similar
functions.
Signed-off-by: NNick Piggin <npiggin@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b7ab795b
......@@ -311,7 +311,7 @@ extern void FASTCALL(__page_cache_release(struct page *));
static inline int page_count(struct page *page)
{
if (PageCompound(page))
if (unlikely(PageCompound(page)))
page = (struct page *)page_private(page);
return atomic_read(&page->_count);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册