Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230839
b: refs/heads/master
c: 50de1dd
h: refs/heads/master
i:
  230837: 4332e75
  230835: aff16e7
  230831: 29d3619
v: v3
  • Loading branch information
Daisuke Nishimura authored and Linus Torvalds committed Jan 14, 2011
1 parent a5bfd2a commit 144fa01
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 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: 17295c88a160c6eea3fcf46cec9d08a0fcb02db9
refs/heads/master: 50de1dd967d4ba3b8a90ebe7a4f5feca24191317
5 changes: 2 additions & 3 deletions trunk/include/linux/memcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ extern int
mem_cgroup_prepare_migration(struct page *page,
struct page *newpage, struct mem_cgroup **ptr);
extern void mem_cgroup_end_migration(struct mem_cgroup *mem,
struct page *oldpage, struct page *newpage);
struct page *oldpage, struct page *newpage, bool migration_ok);

/*
* For memory reclaim.
Expand Down Expand Up @@ -251,8 +251,7 @@ mem_cgroup_prepare_migration(struct page *page, struct page *newpage,
}

static inline void mem_cgroup_end_migration(struct mem_cgroup *mem,
struct page *oldpage,
struct page *newpage)
struct page *oldpage, struct page *newpage, bool migration_ok)
{
}

Expand Down
5 changes: 2 additions & 3 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2896,7 +2896,7 @@ int mem_cgroup_prepare_migration(struct page *page,

/* remove redundant charge if migration failed*/
void mem_cgroup_end_migration(struct mem_cgroup *mem,
struct page *oldpage, struct page *newpage)
struct page *oldpage, struct page *newpage, bool migration_ok)
{
struct page *used, *unused;
struct page_cgroup *pc;
Expand All @@ -2905,8 +2905,7 @@ void mem_cgroup_end_migration(struct mem_cgroup *mem,
return;
/* blocks rmdir() */
cgroup_exclude_rmdir(&mem->css);
/* at migration success, oldpage->mapping is NULL. */
if (oldpage->mapping) {
if (!migration_ok) {
used = oldpage;
unused = newpage;
} else {
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,

uncharge:
if (!charge)
mem_cgroup_end_migration(mem, page, newpage);
mem_cgroup_end_migration(mem, page, newpage, rc == 0);
unlock:
unlock_page(page);

Expand Down

0 comments on commit 144fa01

Please sign in to comment.