mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 16:54:02 +00:00
add KASSERTS
This commit is contained in:
parent
23385eb7dd
commit
1a31a6c3b2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134892
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue