summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2011-02-04 21:49:24 +0000
committeralc <alc@FreeBSD.org>2011-02-04 21:49:24 +0000
commite017b59ac628da5d1f642a53fd303abb72e8843e (patch)
tree6e8e09addc9bdf0f6064448b126e2e29be9b75d2 /sys/vm/vm_map.c
parent0beb03c7a6efb9f00d850d3e7d11eb9572de1595 (diff)
downloadFreeBSD-src-e017b59ac628da5d1f642a53fd303abb72e8843e.zip
FreeBSD-src-e017b59ac628da5d1f642a53fd303abb72e8843e.tar.gz
Since the last parameter to vm_object_shadow() is a vm_size_t and not a
vm_pindex_t, it makes no sense for its callers to perform atop(). Let vm_object_shadow() do that instead.
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 59d7fe1..79d90f5 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -3077,8 +3077,8 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_charge)
vm_object_reference(object);
if (old_entry->eflags & MAP_ENTRY_NEEDS_COPY) {
vm_object_shadow(&old_entry->object.vm_object,
- &old_entry->offset,
- atop(old_entry->end - old_entry->start));
+ &old_entry->offset,
+ old_entry->end - old_entry->start);
old_entry->eflags &= ~MAP_ENTRY_NEEDS_COPY;
/* Transfer the second reference too. */
vm_object_reference(
@@ -3589,8 +3589,8 @@ vm_map_lookup(vm_map_t *var_map, /* IN/OUT */
vm_prot_t prot;
vm_prot_t fault_type = fault_typea;
vm_object_t eobject;
+ vm_size_t size;
struct ucred *cred;
- vm_ooffset_t size;
RetryLookup:;
@@ -3677,10 +3677,8 @@ RetryLookup:;
}
entry->cred = cred;
}
- vm_object_shadow(
- &entry->object.vm_object,
- &entry->offset,
- atop(size));
+ vm_object_shadow(&entry->object.vm_object,
+ &entry->offset, size);
entry->eflags &= ~MAP_ENTRY_NEEDS_COPY;
eobject = entry->object.vm_object;
if (eobject->cred != NULL) {
OpenPOWER on IntegriCloud