summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2013-08-11 21:15:04 +0000
committerattilio <attilio@FreeBSD.org>2013-08-11 21:15:04 +0000
commitf2a180739c682065e108b08462c766e34713ce2c (patch)
tree72eed293ee87372d14ed915c034aefec760852da /sys/vm
parent4ad6d226097345c4a7fecd609aa224f14ba35d18 (diff)
downloadFreeBSD-src-f2a180739c682065e108b08462c766e34713ce2c.zip
FreeBSD-src-f2a180739c682065e108b08462c766e34713ce2c.tar.gz
Correct the recovery logic in vm_page_alloc_contig:
what is really needed on this code snipped is that all the pages that are already fully inserted gets fully freed, while for the others the object removal itself might be skipped, hence the object might be set to NULL. Sponsored by: EMC / Isilon storage division Reported by: alc, kib Reviewed by: alc
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_page.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index b204ae2..d2e2b20 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -1807,11 +1807,9 @@ retry:
&deferred_vdrop_list);
if (vm_paging_needed())
pagedaemon_wakeup();
- for (m = m_ret, m_tmp = m_ret;
+ for (m_tmp = m, m = m_ret;
m < &m_ret[npages]; m++) {
- if (m_tmp < m)
- m_tmp++;
- else
+ if (m >= m_tmp)
m->object = NULL;
vm_page_free(m);
}
OpenPOWER on IntegriCloud