diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2012-03-14 20:19:49 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2012-03-14 20:19:49 +0000 |
commit | 71beaf7fd7f9288403495c3ae724b81306eed265 (patch) | |
tree | ddadabd1bc0fe7f272d0168be9ee5ef48ca6c17e /sys/powerpc/aim/mmu_oea64.c | |
parent | 8dc16cc83eb816a1af41deb284900cefbf64abfb (diff) | |
download | FreeBSD-src-71beaf7fd7f9288403495c3ae724b81306eed265.zip FreeBSD-src-71beaf7fd7f9288403495c3ae724b81306eed265.tar.gz |
Use LIST_FOREACH_SAFE() instead of LIST_FOREACH() in pmap_remove(), since
the point of this loop is to remove elements. This worked by accident before.
MFC after: 2 days
Diffstat (limited to 'sys/powerpc/aim/mmu_oea64.c')
-rw-r--r-- | sys/powerpc/aim/mmu_oea64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index 84680b6..1bd88c4 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -2039,7 +2039,7 @@ moea64_release(mmu_t mmu, pmap_t pmap) void moea64_remove(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva) { - struct pvo_entry *pvo; + struct pvo_entry *pvo, *tpvo; vm_page_lock_queues(); PMAP_LOCK(pm); @@ -2050,7 +2050,7 @@ moea64_remove(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva) moea64_pvo_remove(mmu, pvo); } } else { - LIST_FOREACH(pvo, &pm->pmap_pvo, pvo_plink) { + LIST_FOREACH_SAFE(pvo, &pm->pmap_pvo, pvo_plink, tpvo) { if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva) continue; moea64_pvo_remove(mmu, pvo); |