summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-08-02 05:05:34 +0000
committeralc <alc@FreeBSD.org>2003-08-02 05:05:34 +0000
commit507ad47156bf84b9ea320256ed15d553d02a0911 (patch)
treeb8f50be856f35153b1b3501efa289ec14a58ea3b /sys/kern/vfs_bio.c
parent4d05c167d2ade8defd360cb305402c9a4af58d97 (diff)
downloadFreeBSD-src-507ad47156bf84b9ea320256ed15d553d02a0911.zip
FreeBSD-src-507ad47156bf84b9ea320256ed15d553d02a0911.tar.gz
Eliminate an abuse of kmem_alloc_pageable() in bufinit()
by using VM_ALLOC_NOOBJ to allocate the bogus page. Reviewed by: tegge
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index f6e8787..688f4c0 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -493,7 +493,6 @@ void
bufinit(void)
{
struct buf *bp;
- vm_offset_t bogus_offset;
int i;
GIANT_REQUIRED;
@@ -586,12 +585,8 @@ bufinit(void)
* from buf_daemon.
*/
- bogus_offset = kmem_alloc_pageable(kernel_map, PAGE_SIZE);
- VM_OBJECT_LOCK(kernel_object);
- bogus_page = vm_page_alloc(kernel_object,
- ((bogus_offset - VM_MIN_KERNEL_ADDRESS) >> PAGE_SHIFT),
+ bogus_page = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ |
VM_ALLOC_NORMAL | VM_ALLOC_WIRED);
- VM_OBJECT_UNLOCK(kernel_object);
}
/*
OpenPOWER on IntegriCloud