Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230763
b: refs/heads/master
c: 4e6af67
h: refs/heads/master
i:
  230761: f48b945
  230759: c931544
v: v3
  • Loading branch information
Andrea Arcangeli authored and Linus Torvalds committed Jan 14, 2011
1 parent 84d268e commit 6bf9289
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 91a4ee2670e0ee2b0630a0eb24fb9a87ea3acd0a
refs/heads/master: 4e6af67e970a2ac287739a4c526c857b5bda27ec
17 changes: 16 additions & 1 deletion trunk/include/linux/page-flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,14 +347,21 @@ static inline void set_page_writeback(struct page *page)
* tests can be used in performance sensitive paths. PageCompound is
* generally not used in hot code paths.
*/
__PAGEFLAG(Head, head)
__PAGEFLAG(Head, head) CLEARPAGEFLAG(Head, head)
__PAGEFLAG(Tail, tail)

static inline int PageCompound(struct page *page)
{
return page->flags & ((1L << PG_head) | (1L << PG_tail));

}
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
static inline void ClearPageCompound(struct page *page)
{
BUG_ON(!PageHead(page));
ClearPageHead(page);
}
#endif
#else
/*
* Reduce page flag use as much as possible by overlapping
Expand Down Expand Up @@ -392,6 +399,14 @@ static inline void __ClearPageTail(struct page *page)
page->flags &= ~PG_head_tail_mask;
}

#ifdef CONFIG_TRANSPARENT_HUGEPAGE
static inline void ClearPageCompound(struct page *page)
{
BUG_ON((page->flags & PG_head_tail_mask) != (1 << PG_compound));
clear_bit(PG_compound, &page->flags);
}
#endif

#endif /* !PAGEFLAGS_EXTENDED */

#ifdef CONFIG_MMU
Expand Down

0 comments on commit 6bf9289

Please sign in to comment.