diff options
author | alc <alc@FreeBSD.org> | 2009-06-09 17:04:39 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2009-06-09 17:04:39 +0000 |
commit | dd8ed7c8dbdff354ebf6afe2762de043dd7e65ea (patch) | |
tree | c26c85a4eb5c37914dea4f5027c1105e7e47d4bb /sys/vm | |
parent | 61418971f4dc85a3632054e202ccf76013a93e36 (diff) | |
download | FreeBSD-src-dd8ed7c8dbdff354ebf6afe2762de043dd7e65ea.zip FreeBSD-src-dd8ed7c8dbdff354ebf6afe2762de043dd7e65ea.tar.gz |
Eliminate an unnecessary restriction on the vm object type from
vm_map_pmap_enter(). The immediate effect of this change is that automatic
prefaulting by mmap() for small mappings is performed on POSIX shared memory
objects just the same as it is on ordinary files.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_map.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index bd8a09a..d6775b7 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1643,11 +1643,9 @@ vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot, psize = atop(size); - if (object->type != OBJT_VNODE || - ((flags & MAP_PREFAULT_PARTIAL) && (psize > MAX_INIT_PT) && - (object->resident_page_count > MAX_INIT_PT))) { + if ((flags & MAP_PREFAULT_PARTIAL) && psize > MAX_INIT_PT && + object->resident_page_count > MAX_INIT_PT) goto unlock_return; - } if (psize + pindex > object->size) { if (object->size < pindex) |