diff options
author | alc <alc@FreeBSD.org> | 2006-12-16 08:17:07 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2006-12-16 08:17:07 +0000 |
commit | 71d9f62bcafce71757437bba4ffcde0eb6dd4009 (patch) | |
tree | 26717ee21d923a89afd47a1813eb128b844c4eda /sys/vm | |
parent | 8cbedd19f7ceca9a9e50e03900cae73b57beba1e (diff) | |
download | FreeBSD-src-71d9f62bcafce71757437bba4ffcde0eb6dd4009.zip FreeBSD-src-71d9f62bcafce71757437bba4ffcde0eb6dd4009.tar.gz |
Simplify the computation of the new object's size in vm_object_split().
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 472f254..d4b62e3 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1289,7 +1289,7 @@ vm_object_split(vm_map_entry_t entry) { vm_page_t m; vm_object_t orig_object, new_object, source; - vm_pindex_t offidxstart, offidxend; + vm_pindex_t offidxstart; vm_size_t idx, size; orig_object = entry->object.vm_object; @@ -1300,8 +1300,7 @@ vm_object_split(vm_map_entry_t entry) VM_OBJECT_UNLOCK(orig_object); offidxstart = OFF_TO_IDX(entry->offset); - offidxend = offidxstart + OFF_TO_IDX(entry->end - entry->start); - size = offidxend - offidxstart; + size = atop(entry->end - entry->start); /* * If swap_pager_copy() is later called, it will convert new_object |