Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356550
b: refs/heads/master
c: 4db0e95
h: refs/heads/master
v: v3
  • Loading branch information
Naoya Horiguchi authored and Linus Torvalds committed Feb 24, 2013
1 parent 41825ef commit 4a5d19a
Show file tree
Hide file tree
Showing 2 changed files with 12 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: af8fae7c08862bb85c5cf445bf9b36314b82111f
refs/heads/master: 4db0e950c5b78586bea9e1b027be849631f89a17
12 changes: 11 additions & 1 deletion trunk/mm/memory-failure.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,17 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
return 0;
}

nr_pages = 1 << compound_trans_order(hpage);
/*
* Currently errors on hugetlbfs pages are measured in hugepage units,
* so nr_pages should be 1 << compound_order. OTOH when errors are on
* transparent hugepages, they are supposed to be split and error
* measurement is done in normal page units. So nr_pages should be one
* in this case.
*/
if (PageHuge(p))
nr_pages = 1 << compound_order(hpage);
else /* normal page or thp */
nr_pages = 1;
atomic_long_add(nr_pages, &num_poisoned_pages);

/*
Expand Down

0 comments on commit 4a5d19a

Please sign in to comment.