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
This commit is contained in:
Attilio Rao 2013-08-11 21:15:04 +00:00
parent e656ab0f3a
commit 6006884122

View File

@ -1807,11 +1807,9 @@ vm_page_alloc_contig(vm_object_t object, vm_pindex_t pindex, int req,
&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);
}