aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mempolicy.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-12 10:22:49 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-12 10:22:49 -0700
commitfbf8d7106c926d375c76e65cc878f4fa7b91cbc3 (patch)
treee9faf7f8a9ce8da9ad2e2a3f1768a4af414670d4 /mm/mempolicy.c
parent98f62b7a082e1e9eb762c7329a704316f6e07698 (diff)
parentd4e4ab86bcba5a72779c43dc1459f71fea3d89c8 (diff)
downloadkernel_goldelico_gta04-fbf8d7106c926d375c76e65cc878f4fa7b91cbc3.zip
kernel_goldelico_gta04-fbf8d7106c926d375c76e65cc878f4fa7b91cbc3.tar.gz
kernel_goldelico_gta04-fbf8d7106c926d375c76e65cc878f4fa7b91cbc3.tar.bz2
Merge 3.11-rc5 into staging-next
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r--mm/mempolicy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 7431001..4baf12e 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -732,7 +732,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
if (prev) {
vma = prev;
next = vma->vm_next;
- continue;
+ if (mpol_equal(vma_policy(vma), new_pol))
+ continue;
+ /* vma_merge() joined vma && vma->next, case 8 */
+ goto replace;
}
if (vma->vm_start != vmstart) {
err = split_vma(vma->vm_mm, vma, vmstart, 1);
@@ -744,6 +747,7 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
if (err)
goto out;
}
+ replace:
err = vma_replace_policy(vma, new_pol);
if (err)
goto out;