Move map_generation snapshot value into struct faultstate.
Reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
272cc3c4d0
commit
dc5401d240
@ -122,6 +122,7 @@ struct faultstate {
|
||||
vm_pindex_t first_pindex;
|
||||
vm_map_t map;
|
||||
vm_map_entry_t entry;
|
||||
int map_generation;
|
||||
bool lookup_still_valid;
|
||||
struct vnode *vp;
|
||||
};
|
||||
@ -339,7 +340,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type,
|
||||
vm_pindex_t retry_pindex;
|
||||
vm_prot_t prot, retry_prot;
|
||||
int ahead, alloc_req, behind, cluster_offset, error, era, faultcount;
|
||||
int locked, map_generation, nera, result, rv;
|
||||
int locked, nera, result, rv;
|
||||
u_char behavior;
|
||||
boolean_t wired; /* Passed by reference. */
|
||||
bool dead, growstack, hardfault, is_first_object_locked;
|
||||
@ -373,7 +374,7 @@ RetryFault:;
|
||||
return (result);
|
||||
}
|
||||
|
||||
map_generation = fs.map->timestamp;
|
||||
fs.map_generation = fs.map->timestamp;
|
||||
|
||||
if (fs.entry->eflags & MAP_ENTRY_NOFAULT) {
|
||||
panic("vm_fault: fault on nofault entry, addr: %lx",
|
||||
@ -972,7 +973,7 @@ RetryFault:;
|
||||
goto RetryFault;
|
||||
}
|
||||
fs.lookup_still_valid = true;
|
||||
if (fs.map->timestamp != map_generation) {
|
||||
if (fs.map->timestamp != fs.map_generation) {
|
||||
result = vm_map_lookup_locked(&fs.map, vaddr, fault_type,
|
||||
&fs.entry, &retry_object, &retry_pindex, &retry_prot, &wired);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user