diff options
author | attilio <attilio@FreeBSD.org> | 2013-08-11 21:15:04 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-08-11 21:15:04 +0000 |
commit | f2a180739c682065e108b08462c766e34713ce2c (patch) | |
tree | 72eed293ee87372d14ed915c034aefec760852da /sys/vm | |
parent | 4ad6d226097345c4a7fecd609aa224f14ba35d18 (diff) | |
download | FreeBSD-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.c | 6 |
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); } |