Skip to content

Commit

Permalink
[PATCH] mm: optimise page_count
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Mar 22, 2006
1 parent b7ab795 commit 617d221
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 617d221

Please sign in to comment.