diff options
author | Grant Likely <grant.likely@linaro.org> | 2013-08-28 20:18:13 +0100 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2013-08-28 20:18:13 +0100 |
commit | 8be137f2664f0abb096626a9d2ce0fcdd955b109 (patch) | |
tree | 2c53a5535265a58eb397d6fbbab2ec26e92e6931 /mm/mempolicy.c | |
parent | 8851b9f1625ce0858e9b1bb0ae4a57d4b43178b1 (diff) | |
parent | d8dfad3876e4386666b759da3c833d62fb8b2267 (diff) |
Merge tag 'v3.11-rc7' into devicetree/next
Linux 3.11-rc7
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 74310017296e..4baf12e534d1 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; |