]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
migration: migrate_vmas should check "vma"
authorDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Wed, 11 Feb 2009 21:04:18 +0000 (13:04 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Feb 2009 22:25:34 +0000 (14:25 -0800)
migrate_vmas() should check "vma" not "vma->vm_next" for for-loop condition.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c

index 2bb4e1d6352046e9030a789a9b78c385cd104c5b..a9eff3f092f622a451753a1dc155f5b7fbdd7ab6 100644 (file)
@@ -1129,7 +1129,7 @@ int migrate_vmas(struct mm_struct *mm, const nodemask_t *to,
        struct vm_area_struct *vma;
        int err = 0;
 
-       for(vma = mm->mmap; vma->vm_next && !err; vma = vma->vm_next) {
+       for (vma = mm->mmap; vma && !err; vma = vma->vm_next) {
                if (vma->vm_ops && vma->vm_ops->migrate) {
                        err = vma->vm_ops->migrate(vma, to, from, flags);
                        if (err)