diff options
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 6424ba0fce83..8ab841031436 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -2896,7 +2896,7 @@ int mem_cgroup_prepare_migration(struct page *page, | |||
2896 | 2896 | ||
2897 | /* remove redundant charge if migration failed*/ | 2897 | /* remove redundant charge if migration failed*/ |
2898 | void mem_cgroup_end_migration(struct mem_cgroup *mem, | 2898 | void mem_cgroup_end_migration(struct mem_cgroup *mem, |
2899 | struct page *oldpage, struct page *newpage) | 2899 | struct page *oldpage, struct page *newpage, bool migration_ok) |
2900 | { | 2900 | { |
2901 | struct page *used, *unused; | 2901 | struct page *used, *unused; |
2902 | struct page_cgroup *pc; | 2902 | struct page_cgroup *pc; |
@@ -2905,8 +2905,7 @@ void mem_cgroup_end_migration(struct mem_cgroup *mem, | |||
2905 | return; | 2905 | return; |
2906 | /* blocks rmdir() */ | 2906 | /* blocks rmdir() */ |
2907 | cgroup_exclude_rmdir(&mem->css); | 2907 | cgroup_exclude_rmdir(&mem->css); |
2908 | /* at migration success, oldpage->mapping is NULL. */ | 2908 | if (!migration_ok) { |
2909 | if (oldpage->mapping) { | ||
2910 | used = oldpage; | 2909 | used = oldpage; |
2911 | unused = newpage; | 2910 | unused = newpage; |
2912 | } else { | 2911 | } else { |