Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 617d2214 authored by Nick Piggin's avatar Nick Piggin Committed by Linus Torvalds
Browse files

[PATCH] mm: optimise page_count



Optimise page_count compound page test and make it consistent with similar
functions.

Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b7ab795b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}