Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292648
b: refs/heads/master
c: 385de35
h: refs/heads/master
v: v3
  • Loading branch information
Dean Nelson authored and Linus Torvalds committed Mar 22, 2012
1 parent cc641f6 commit ef643bf
Show file tree
Hide file tree
Showing 3 changed files with 22 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: 6d9d88d07e132259c35f9493b15429e19198489c
refs/heads/master: 385de35722c9a22917e7bc5e63cd83a8cffa5ecd
20 changes: 20 additions & 0 deletions trunk/include/linux/page-flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,26 @@ static inline int PageTransHuge(struct page *page)
return PageHead(page);
}

/*
* PageTransCompound returns true for both transparent huge pages
* and hugetlbfs pages, so it should only be called when it's known
* that hugetlbfs pages aren't involved.
*/
static inline int PageTransCompound(struct page *page)
{
return PageCompound(page);
}

/*
* PageTransTail returns true for both transparent huge pages
* and hugetlbfs pages, so it should only be called when it's known
* that hugetlbfs pages aren't involved.
*/
static inline int PageTransTail(struct page *page)
{
return PageTail(page);
}

#else

static inline int PageTransHuge(struct page *page)
Expand All @@ -430,6 +445,11 @@ static inline int PageTransCompound(struct page *page)
{
return 0;
}

static inline int PageTransTail(struct page *page)
{
return 0;
}
#endif

#ifdef CONFIG_MMU
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/memory-failure.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ int __memory_failure(unsigned long pfn, int trapno, int flags)
* The check (unnecessarily) ignores LRU pages being isolated and
* walked by the page reclaim code, however that's not a big loss.
*/
if (!PageHuge(p) && !PageTransCompound(p)) {
if (!PageHuge(p) && !PageTransTail(p)) {
if (!PageLRU(p))
shake_page(p, 0);
if (!PageLRU(p)) {
Expand Down

0 comments on commit ef643bf

Please sign in to comment.