Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284391
b: refs/heads/master
c: 0efc8eb
h: refs/heads/master
i:
  284389: 4fbf2f4
  284387: a93ef5a
  284383: 1b86b57
v: v3
  • Loading branch information
Bob Liu authored and Linus Torvalds committed Jan 13, 2012
1 parent 6f469c2 commit 606cade
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 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: d0048b0e59c1218d62bb4d014f34bbd7e7c0a214
refs/heads/master: 0efc8eb9c6a177836dac88b2cbb8815f9e4f8d5a
30 changes: 14 additions & 16 deletions trunk/mm/page_cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,22 +124,6 @@ static void *__meminit alloc_page_cgroup(size_t size, int nid)
return addr;
}

#ifdef CONFIG_MEMORY_HOTPLUG
static void free_page_cgroup(void *addr)
{
if (is_vmalloc_addr(addr)) {
vfree(addr);
} else {
struct page *page = virt_to_page(addr);
size_t table_size =
sizeof(struct page_cgroup) * PAGES_PER_SECTION;

BUG_ON(PageReserved(page));
free_pages_exact(addr, table_size);
}
}
#endif

static int __meminit init_section_page_cgroup(unsigned long pfn, int nid)
{
struct mem_section *section;
Expand Down Expand Up @@ -176,6 +160,20 @@ static int __meminit init_section_page_cgroup(unsigned long pfn, int nid)
return 0;
}
#ifdef CONFIG_MEMORY_HOTPLUG
static void free_page_cgroup(void *addr)
{
if (is_vmalloc_addr(addr)) {
vfree(addr);
} else {
struct page *page = virt_to_page(addr);
size_t table_size =
sizeof(struct page_cgroup) * PAGES_PER_SECTION;

BUG_ON(PageReserved(page));
free_pages_exact(addr, table_size);
}
}

void __free_page_cgroup(unsigned long pfn)
{
struct mem_section *ms;
Expand Down

0 comments on commit 606cade

Please sign in to comment.