diff options
author | dg <dg@FreeBSD.org> | 1996-03-16 15:00:05 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1996-03-16 15:00:05 +0000 |
commit | 47ab1071a249efe8a7f69b6dfd4549af49f527de (patch) | |
tree | 10cf1658ddf2b543ac34f597a68e4ae7bfe2f27d /sys/vm | |
parent | 6d4bf6f5df6e520f349347b3b944735417fc95d2 (diff) | |
download | FreeBSD-src-47ab1071a249efe8a7f69b6dfd4549af49f527de.zip FreeBSD-src-47ab1071a249efe8a7f69b6dfd4549af49f527de.tar.gz |
Force device mappings to always be shared. It doesn't make sense for them
to ever be COW and we need the mappings to be shared for backward
compatibilty.
Reviewed by: dyson
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_mmap.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index e1de743..72a3b6b 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -38,7 +38,7 @@ * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$ * * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94 - * $Id: vm_mmap.c,v 1.38 1996/03/02 17:14:09 peter Exp $ + * $Id: vm_mmap.c,v 1.39 1996/03/12 02:27:20 dyson Exp $ */ /* @@ -754,11 +754,12 @@ vm_mmap(map, addr, size, prot, maxprot, flags, handle, foff) return (type == OBJT_DEVICE ? EINVAL : ENOMEM); /* - * default to MAP_SHARED on a device mapping + * Force device mappings to be shared. */ - if ((type == OBJT_DEVICE) && - (flags & (MAP_SHARED|MAP_COPY|MAP_PRIVATE)) == 0) + if (type == OBJT_DEVICE) { + flags &= ~(MAP_PRIVATE|MAP_COPY); flags |= MAP_SHARED; + } object2 = NULL; docow = 0; |