]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix arithmetical bug in vnode_pager_haspage(). The check against object size
authorglebius <glebius@FreeBSD.org>
Mon, 4 May 2015 18:49:25 +0000 (18:49 +0000)
committerglebius <glebius@FreeBSD.org>
Mon, 4 May 2015 18:49:25 +0000 (18:49 +0000)
commitacfa1865000f67a72607322c5871a3f3195748d3
treeac93685de0ae603551c4aabbb1104bb2af680fbc
parent5755f2166fc0a75800f6c4b41e1812730a439f92
Fix arithmetical bug in vnode_pager_haspage().  The check against object size
should be done not with the number of pages in the first block, but with the
overall number of pages.  While here, add KASSERT that makes sure that BMAP
doesn't return completely irrelevant blocks.

Reviewed by: kib
Tested by: pho
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
sys/vm/vnode_pager.c