Use vm_page_active() rather than directly accessing the page's queue

field.

Reviewed by:	kib, markj
MFC after:	2 weeks
X-MFC with:	r324146
This commit is contained in:
Alan Cox 2017-10-02 07:30:21 +00:00
parent d9ccb9a89f
commit 0c0e1e96c6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=324190

View File

@ -209,10 +209,10 @@ uiomove_object_page(vm_object_t obj, size_t len, struct uio *uio)
}
vm_page_lock(m);
vm_page_hold(m);
if (m->queue != PQ_ACTIVE)
vm_page_activate(m);
else
if (vm_page_active(m))
vm_page_reference(m);
else
vm_page_activate(m);
vm_page_unlock(m);
VM_OBJECT_WUNLOCK(obj);
error = uiomove_fromphys(&m, offset, tlen, uio);