mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
[PATCH] mm: optimise page_count
Optimise page_count compound page test and make it consistent with similar functions. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
b7ab795b7b
commit
617d2214ee
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user