mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
Slight performance tweak for previous commit.
This commit is contained in:
parent
f230c45cbe
commit
0f281c28fa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17313
@ -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.46 1996/07/27 04:06:11 dyson Exp $
|
||||
* $Id: vm_mmap.c,v 1.47 1996/07/27 17:21:41 dyson Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -883,13 +883,14 @@ vm_mmap(map, addr, size, prot, maxprot, flags, handle, foff)
|
||||
* Lookup/allocate object.
|
||||
*/
|
||||
if (flags & MAP_ANON) {
|
||||
type = OBJT_SWAP;
|
||||
/*
|
||||
* Unnamed anonymous regions always start at 0.
|
||||
*/
|
||||
if (handle == 0) {
|
||||
foff = 0;
|
||||
type = OBJT_DEFAULT;
|
||||
} else {
|
||||
type = OBJT_SWAP;
|
||||
}
|
||||
} else {
|
||||
vp = (struct vnode *) handle;
|
||||
|
Loading…
Reference in New Issue
Block a user