Page MenuHomeFreeBSD

D46518.id142838.diff
No OneTemporary

D46518.id142838.diff

diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -1063,8 +1063,8 @@
{
struct vnode *vp;
struct bufobj *bo;
+ uintmax_t bstart, bend;
daddr_t startn, endn;
- off_t bstart, bend, start, end;
int bsize, error;
vp = ap->a_vp;
@@ -1096,7 +1096,8 @@
*/
bsize = vp->v_bufobj.bo_bsize;
bstart = rounddown(ap->a_start, bsize);
- bend = roundup(ap->a_end, bsize);
+ bend = ap->a_end;
+ bend = roundup(bend, bsize);
/*
* Deactivate pages in the specified range from the backing VM
@@ -1105,18 +1106,17 @@
* below.
*/
if (vp->v_object != NULL) {
- start = trunc_page(bstart);
- end = round_page(bend);
VM_OBJECT_RLOCK(vp->v_object);
- vm_object_page_noreuse(vp->v_object, OFF_TO_IDX(start),
- OFF_TO_IDX(end));
+ vm_object_page_noreuse(vp->v_object,
+ OFF_TO_IDX(trunc_page(bstart)),
+ OFF_TO_IDX(round_page(bend)));
VM_OBJECT_RUNLOCK(vp->v_object);
}
bo = &vp->v_bufobj;
- BO_RLOCK(bo);
startn = bstart / bsize;
endn = bend / bsize;
+ BO_RLOCK(bo);
error = bnoreuselist(&bo->bo_clean, bo, startn, endn);
if (error == 0)
error = bnoreuselist(&bo->bo_dirty, bo, startn, endn);

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 10:36 PM (3 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11369429
Default Alt Text
D46518.id142838.diff (1 KB)

Event Timeline