Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286594
b: refs/heads/master
c: 687875f
h: refs/heads/master
v: v3
  • Loading branch information
Michal Hocko authored and Linus Torvalds committed Jan 23, 2012
1 parent fcd5a19 commit e297fb4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6536e3123e5d3371a6f52e32a3d0694bcc987702
refs/heads/master: 687875fb7de4a95223af20ee024282fa9099f860
11 changes: 11 additions & 0 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5414,6 +5414,17 @@ __count_immobile_pages(struct zone *zone, struct page *page, int count)
bool is_pageblock_removable_nolock(struct page *page)
{
struct zone *zone = page_zone(page);
unsigned long pfn = page_to_pfn(page);

/*
* We have to be careful here because we are iterating over memory
* sections which are not zone aware so we might end up outside of
* the zone but still within the section.
*/
if (!zone || zone->zone_start_pfn > pfn ||
zone->zone_start_pfn + zone->spanned_pages <= pfn)
return false;

return __count_immobile_pages(zone, page, 0);
}

Expand Down

0 comments on commit e297fb4

Please sign in to comment.