summaryrefslogtreecommitdiffstats
path: root/sys/vm/vnode_pager.c
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2002-07-01 14:14:07 +0000
committerrobert <robert@FreeBSD.org>2002-07-01 14:14:07 +0000
commit20e451e8dc81259aed016ba86f53495037c820cd (patch)
tree7a761b8149bb2edb2a6a0d763fec357bfedb1ad2 /sys/vm/vnode_pager.c
parentf6364a955e01d3049c475f7bc6ff1d911be69324 (diff)
downloadFreeBSD-src-20e451e8dc81259aed016ba86f53495037c820cd.zip
FreeBSD-src-20e451e8dc81259aed016ba86f53495037c820cd.tar.gz
- Use (OFF_TO_IDX(off) - pi) instead of (OFF_TO_IDX(off - IDX_TO_OFF(pi))).
- Reformat a comment.
Diffstat (limited to 'sys/vm/vnode_pager.c')
-rw-r--r--sys/vm/vnode_pager.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index 32660d3..ec18c0d 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -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.
OpenPOWER on IntegriCloud