- Use (OFF_TO_IDX(off) - pi) instead of (OFF_TO_IDX(off - IDX_TO_OFF(pi))).

- Reformat a comment.
This commit is contained in:
Robert Drehmel 2002-07-01 14:14:07 +00:00
parent 21ee796112
commit 47e151dd7a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99211

View File

@ -240,8 +240,11 @@ vnode_pager_haspage(object, pindex, before, after)
int numafter;
*after *= pagesperblock;
numafter = pagesperblock - (poff + 1);
if (IDX_TO_OFF(pindex + numafter) > object->un_pager.vnp.vnp_size) {
numafter = OFF_TO_IDX((object->un_pager.vnp.vnp_size - IDX_TO_OFF(pindex)));
if (IDX_TO_OFF(pindex + numafter) >
object->un_pager.vnp.vnp_size) {
numafter =
OFF_TO_IDX(object->un_pager.vnp.vnp_size) -
pindex;
}
*after += numafter;
}
@ -578,8 +581,8 @@ vnode_pager_input_old(object, m)
/*
* Local media VFS's that do not implement their own VOP_GETPAGES
* should have their VOP_GETPAGES should call to
* vnode_pager_generic_getpages() to implement the previous behaviour.
* should have their VOP_GETPAGES call to vnode_pager_generic_getpages()
* to implement the previous behaviour.
*
* All other FS's should use the bypass to get to the local media
* backing vp's VOP_GETPAGES.
@ -603,7 +606,6 @@ vnode_pager_getpages(object, m, count, reqpage)
return rtval;
}
/*
* This is now called from local media FS's to operate against their
* own vnodes if they fail to implement VOP_GETPAGES.