Fix assertion in sendfile_readpage() to assert only the validity

of requested amount of data in a page. Move assertion down below
object unlock.

Approved by:	re (kib)
Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
This commit is contained in:
Gleb Smirnoff 2013-09-17 06:37:21 +00:00
parent 0312d1cab6
commit 85fdd534cf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255625

View File

@ -2076,10 +2076,10 @@ sendfile_readpage(vm_object_t obj, struct vnode *vp, int nd,
vm_page_free(m);
vm_page_unlock(m);
}
VM_OBJECT_WUNLOCK(obj);
KASSERT(error != 0 || (m->wire_count > 0 && m->valid ==
VM_PAGE_BITS_ALL),
KASSERT(error != 0 || (m->wire_count > 0 &&
vm_page_is_valid(m, off & PAGE_MASK, xfsize)),
("wrong page state m %p", m));
VM_OBJECT_WUNLOCK(obj);
return (error);
}