summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>2009-02-11 13:04:18 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-11 14:25:34 -0800
commit1001c9fb8721ab395e21f571ed2aaa523cdd1e29 (patch)
treefc8835db2b1a5fb5b147af4025767d3393bb3a33 /mm
parent17c9d12e126cb0de8d535dc1908c4819d712bc68 (diff)
downloadblackbird-op-linux-1001c9fb8721ab395e21f571ed2aaa523cdd1e29.tar.gz
blackbird-op-linux-1001c9fb8721ab395e21f571ed2aaa523cdd1e29.zip
migration: migrate_vmas should check "vma"
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>
Diffstat (limited to 'mm')
-rw-r--r--mm/migrate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 2bb4e1d63520..a9eff3f092f6 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -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)
OpenPOWER on IntegriCloud