diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-11-20 11:03:38 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-11-20 11:03:38 +0300 |
| commit | 90accd6fabf9b2fa2705945a4c601877a75d43bf (patch) | |
| tree | d393cb54f0228b1313139e4e14adf4f5cf236b59 /mm/page_isolation.c | |
| parent | b43d196c4d3fe46d6dda7c987c47792612b80b1b (diff) | |
| parent | ee2f6cc7f9ea2542ad46070ed62ba7aa04d08871 (diff) | |
| download | linux-90accd6fabf9b2fa2705945a4c601877a75d43bf.tar.xz | |
Merge branch 'linus' into x86/memory-corruption-check
Diffstat (limited to 'mm/page_isolation.c')
| -rw-r--r-- | mm/page_isolation.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/page_isolation.c b/mm/page_isolation.c index b70a7fec1ff6..5e0ffd967452 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -130,10 +130,11 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn) if (page && get_pageblock_migratetype(page) != MIGRATE_ISOLATE) break; } - if (pfn < end_pfn) + page = __first_valid_page(start_pfn, end_pfn - start_pfn); + if ((pfn < end_pfn) || !page) return -EBUSY; /* Check all pages are free or Marked as ISOLATED */ - zone = page_zone(pfn_to_page(pfn)); + zone = page_zone(page); spin_lock_irqsave(&zone->lock, flags); ret = __test_page_isolated_in_pageblock(start_pfn, end_pfn); spin_unlock_irqrestore(&zone->lock, flags); |
