add KASSERTS

This commit is contained in:
Poul-Henning Kamp 2004-09-07 07:32:40 +00:00
parent 23385eb7dd
commit 1a31a6c3b2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134892

View file

@ -792,8 +792,10 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
* calculate the size of the transfer
*/
size = count * PAGE_SIZE;
KASSERT(count > 0, ("zero count"));
if ((foff + size) > object->un_pager.vnp.vnp_size)
size = object->un_pager.vnp.vnp_size - foff;
KASSERT(size > 0, ("zero size"));
/*
* round up physical size for real devices.