Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356517
b: refs/heads/master
c: cd09968
h: refs/heads/master
i:
  356515: e29fd0c
v: v3
  • Loading branch information
Tang Chen authored and Linus Torvalds committed Feb 24, 2013
1 parent e0d4336 commit e6b9709
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 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: 46723bfa540f0a1e494476a1734d03626a0bd1e0
refs/heads/master: cd099682e4c786c3a866e462b37fcac6e3a44a68
4 changes: 0 additions & 4 deletions trunk/mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,6 @@ static int __remove_section(struct zone *zone, struct mem_section *ms)
#else
static int __remove_section(struct zone *zone, struct mem_section *ms)
{
unsigned long flags;
struct pglist_data *pgdat = zone->zone_pgdat;
int ret = -EINVAL;

if (!valid_section(ms))
Expand All @@ -455,9 +453,7 @@ static int __remove_section(struct zone *zone, struct mem_section *ms)
if (ret)
return ret;

pgdat_resize_lock(pgdat, &flags);
sparse_remove_one_section(zone, ms);
pgdat_resize_unlock(pgdat, &flags);
return 0;
}
#endif
Expand Down
5 changes: 4 additions & 1 deletion trunk/mm/sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,15 +796,18 @@ static inline void clear_hwpoisoned_pages(struct page *memmap, int nr_pages)
void sparse_remove_one_section(struct zone *zone, struct mem_section *ms)
{
struct page *memmap = NULL;
unsigned long *usemap = NULL;
unsigned long *usemap = NULL, flags;
struct pglist_data *pgdat = zone->zone_pgdat;

pgdat_resize_lock(pgdat, &flags);
if (ms->section_mem_map) {
usemap = ms->pageblock_flags;
memmap = sparse_decode_mem_map(ms->section_mem_map,
__section_nr(ms));
ms->section_mem_map = 0;
ms->pageblock_flags = NULL;
}
pgdat_resize_unlock(pgdat, &flags);

clear_hwpoisoned_pages(memmap, PAGES_PER_SECTION);
free_section_usemap(memmap, usemap);
Expand Down

0 comments on commit e6b9709

Please sign in to comment.