diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-08 18:17:25 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-08 18:17:25 -0400 |
commit | cdbb92b31d3c465aa96bd09f2d42c39b87b32bee (patch) | |
tree | 370e29681529882d7e4c766a19f0612885583464 /mm/page_isolation.c | |
parent | 2ec2b482b10a1ed3493c224f1893cddd3d33833b (diff) | |
parent | 69849375d6b13e94d08cdc94b49b11fbab454a0e (diff) |
Merge branch 'linus' into core/rcu
Diffstat (limited to 'mm/page_isolation.c')
-rw-r--r-- | mm/page_isolation.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mm/page_isolation.c b/mm/page_isolation.c index c69f84fe038d..b70a7fec1ff6 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c | |||
@@ -114,8 +114,10 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn) | |||
114 | 114 | ||
115 | int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn) | 115 | int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn) |
116 | { | 116 | { |
117 | unsigned long pfn; | 117 | unsigned long pfn, flags; |
118 | struct page *page; | 118 | struct page *page; |
119 | struct zone *zone; | ||
120 | int ret; | ||
119 | 121 | ||
120 | pfn = start_pfn; | 122 | pfn = start_pfn; |
121 | /* | 123 | /* |
@@ -131,7 +133,9 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn) | |||
131 | if (pfn < end_pfn) | 133 | if (pfn < end_pfn) |
132 | return -EBUSY; | 134 | return -EBUSY; |
133 | /* Check all pages are free or Marked as ISOLATED */ | 135 | /* Check all pages are free or Marked as ISOLATED */ |
134 | if (__test_page_isolated_in_pageblock(start_pfn, end_pfn)) | 136 | zone = page_zone(pfn_to_page(pfn)); |
135 | return 0; | 137 | spin_lock_irqsave(&zone->lock, flags); |
136 | return -EBUSY; | 138 | ret = __test_page_isolated_in_pageblock(start_pfn, end_pfn); |
139 | spin_unlock_irqrestore(&zone->lock, flags); | ||
140 | return ret ? 0 : -EBUSY; | ||
137 | } | 141 | } |