vm_fault.c (51dd214c84efceda87c2ac10d34b7e3ee5b6c28f) | vm_fault.c (f40cb1c6456a66669f6c75d92435b1c1b951387f) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 1994 John S. Dyson 5 * All rights reserved. 6 * Copyright (c) 1994 David Greenman 7 * All rights reserved. 8 * --- 344 unchanged lines hidden (view full) --- 353 354 if (wired) 355 fault_type = prot | (fault_type & VM_PROT_COPY); 356 357 if (fs.vp == NULL /* avoid locked vnode leak */ && 358 (fault_flags & (VM_FAULT_CHANGE_WIRING | VM_FAULT_DIRTY)) == 0 && 359 /* avoid calling vm_object_set_writeable_dirty() */ 360 ((prot & VM_PROT_WRITE) == 0 || | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 1994 John S. Dyson 5 * All rights reserved. 6 * Copyright (c) 1994 David Greenman 7 * All rights reserved. 8 * --- 344 unchanged lines hidden (view full) --- 353 354 if (wired) 355 fault_type = prot | (fault_type & VM_PROT_COPY); 356 357 if (fs.vp == NULL /* avoid locked vnode leak */ && 358 (fault_flags & (VM_FAULT_CHANGE_WIRING | VM_FAULT_DIRTY)) == 0 && 359 /* avoid calling vm_object_set_writeable_dirty() */ 360 ((prot & VM_PROT_WRITE) == 0 || |
361 fs.first_object->type != OBJT_VNODE || | 361 (fs.first_object->type != OBJT_VNODE && 362 (fs.first_object->flags & OBJ_TMPFS_NODE) == 0) || |
362 (fs.first_object->flags & OBJ_MIGHTBEDIRTY) != 0)) { 363 VM_OBJECT_RLOCK(fs.first_object); 364 if ((prot & VM_PROT_WRITE) != 0 && | 363 (fs.first_object->flags & OBJ_MIGHTBEDIRTY) != 0)) { 364 VM_OBJECT_RLOCK(fs.first_object); 365 if ((prot & VM_PROT_WRITE) != 0 && |
365 fs.first_object->type == OBJT_VNODE && | 366 (fs.first_object->type == OBJT_VNODE || 367 (fs.first_object->flags & OBJ_TMPFS_NODE) != 0) && |
366 (fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0) 367 goto fast_failed; 368 m = vm_page_lookup(fs.first_object, fs.first_pindex); 369 /* A busy page can be mapped for read|execute access. */ 370 if (m == NULL || ((prot & VM_PROT_WRITE) != 0 && 371 vm_page_busied(m)) || m->valid != VM_PAGE_BITS_ALL) 372 goto fast_failed; 373 result = pmap_enter(fs.map->pmap, vaddr, m, prot, --- 1212 unchanged lines hidden --- | 368 (fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0) 369 goto fast_failed; 370 m = vm_page_lookup(fs.first_object, fs.first_pindex); 371 /* A busy page can be mapped for read|execute access. */ 372 if (m == NULL || ((prot & VM_PROT_WRITE) != 0 && 373 vm_page_busied(m)) || m->valid != VM_PAGE_BITS_ALL) 374 goto fast_failed; 375 result = pmap_enter(fs.map->pmap, vaddr, m, prot, --- 1212 unchanged lines hidden --- |