Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102125470
D46518.id142838.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D46518.id142838.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D46518: vop_stdadvise(): restore correct handling of length == 0
Attached
Detach File
Event Timeline
Log In to Comment