Skip to content

Commit

Permalink
VM: allow get_page_unless_zero on compound pages
Browse files Browse the repository at this point in the history
Both slab defrag and the large blocksize patches need to ability to take
refcounts on compound pages.  May be useful in other places as well.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Feb 5, 2008
1 parent bf53d6f commit aec2c3e
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 @@ -227,7 +227,7 @@ static inline int put_page_testzero(struct page *page)
*/
static inline int get_page_unless_zero(struct page *page)
{
VM_BUG_ON(PageCompound(page));
VM_BUG_ON(PageTail(page));
return atomic_inc_not_zero(&page->_count);
}

Expand Down

0 comments on commit aec2c3e

Please sign in to comment.