aboutsummaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 857a987e3690..417bbda14e5b 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -29,6 +29,7 @@
29#include <linux/mempolicy.h> 29#include <linux/mempolicy.h>
30#include <linux/vmalloc.h> 30#include <linux/vmalloc.h>
31#include <linux/security.h> 31#include <linux/security.h>
32#include <linux/memcontrol.h>
32 33
33#include "internal.h" 34#include "internal.h"
34 35
@@ -152,6 +153,11 @@ static void remove_migration_pte(struct vm_area_struct *vma,
152 return; 153 return;
153 } 154 }
154 155
156 if (mem_cgroup_charge(new, mm)) {
157 pte_unmap(ptep);
158 return;
159 }
160
155 ptl = pte_lockptr(mm, pmd); 161 ptl = pte_lockptr(mm, pmd);
156 spin_lock(ptl); 162 spin_lock(ptl);
157 pte = *ptep; 163 pte = *ptep;