diff options
| author | John Dyson <dyson@FreeBSD.org> | 1997-12-29 00:25:11 +0000 |
|---|---|---|
| committer | John Dyson <dyson@FreeBSD.org> | 1997-12-29 00:25:11 +0000 |
| commit | 2be70f79f6dcc03377819b327700531ce5455896 (patch) | |
| tree | e16c806fdb19ecadb7a3d2c2fd2ffb344ef606f3 /sys/vm/vm_map.c | |
| parent | d0cc10a88b4696dafc997d9a2acef1ef25ab1def (diff) | |
Notes
Diffstat (limited to 'sys/vm/vm_map.c')
| -rw-r--r-- | sys/vm/vm_map.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 1fe8cc351641..b20b433b4a2c 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.c,v 1.100 1997/12/19 15:31:13 dyson Exp $ + * $Id: vm_map.c,v 1.101 1997/12/25 20:55:15 dyson Exp $ */ /* @@ -1725,15 +1725,19 @@ vm_map_clean(map, start, end, syncio, invalidate) * idea. */ if (current->protection & VM_PROT_WRITE) { - vm_object_page_clean(object, + if (object->type == OBJT_VNODE) + vn_lock(object->handle, LK_EXCLUSIVE, curproc); + vm_object_page_clean(object, OFF_TO_IDX(offset), - OFF_TO_IDX(offset + size), - (syncio||invalidate)?1:0, TRUE); + OFF_TO_IDX(offset + size + PAGE_MASK), + (syncio||invalidate)?1:0); if (invalidate) vm_object_page_remove(object, OFF_TO_IDX(offset), - OFF_TO_IDX(offset + size), + OFF_TO_IDX(offset + size + PAGE_MASK), FALSE); + if (object->type == OBJT_VNODE) + VOP_UNLOCK(object->handle, 0, curproc); } } start += size; |
