summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-05-04 19:24:55 +0000
committerphk <phk@FreeBSD.org>2002-05-04 19:24:55 +0000
commit536c2f0f7810ff7474423f46fb03661e363d1fb2 (patch)
tree62f23c04efccdba1040780fcc46908ed8522f715 /sys/kern/vfs_bio.c
parent513854afbc74561dc25f510f2aa93c90d9e55ef5 (diff)
downloadFreeBSD-src-536c2f0f7810ff7474423f46fb03661e363d1fb2.zip
FreeBSD-src-536c2f0f7810ff7474423f46fb03661e363d1fb2.tar.gz
Remove a six year old undocumented #ifdef : NO_B_MALLOC.
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 7c4fd8e..5d942e1 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2493,15 +2493,12 @@ allocbuf(struct buf *bp, int size)
* mess with B_CACHE.
*/
mbsize = (size + DEV_BSIZE - 1) & ~(DEV_BSIZE - 1);
-#if !defined(NO_B_MALLOC)
if (bp->b_flags & B_MALLOC)
newbsize = mbsize;
else
-#endif
newbsize = round_page(size);
if (newbsize < bp->b_bufsize) {
-#if !defined(NO_B_MALLOC)
/*
* malloced buffers are not shrunk
*/
@@ -2521,13 +2518,11 @@ allocbuf(struct buf *bp, int size)
}
return 1;
}
-#endif
vm_hold_free_pages(
bp,
(vm_offset_t) bp->b_data + newbsize,
(vm_offset_t) bp->b_data + bp->b_bufsize);
} else if (newbsize > bp->b_bufsize) {
-#if !defined(NO_B_MALLOC)
/*
* We only use malloced memory on the first allocation.
* and revert to page-allocated memory when the buffer
@@ -2544,10 +2539,8 @@ allocbuf(struct buf *bp, int size)
bufmallocspace += mbsize;
return 1;
}
-#endif
origbuf = NULL;
origbufsize = 0;
-#if !defined(NO_B_MALLOC)
/*
* If the buffer is growing on its other-than-first allocation,
* then we revert to the page-allocation scheme.
@@ -2564,17 +2557,14 @@ allocbuf(struct buf *bp, int size)
bp->b_flags &= ~B_MALLOC;
newbsize = round_page(newbsize);
}
-#endif
vm_hold_load_pages(
bp,
(vm_offset_t) bp->b_data + bp->b_bufsize,
(vm_offset_t) bp->b_data + newbsize);
-#if !defined(NO_B_MALLOC)
if (origbuf) {
bcopy(origbuf, bp->b_data, origbufsize);
free(origbuf, M_BIOBUF);
}
-#endif
}
} else {
vm_page_t m;
@@ -2584,10 +2574,8 @@ allocbuf(struct buf *bp, int size)
desiredpages = (size == 0) ? 0 :
num_pages((bp->b_offset & PAGE_MASK) + newbsize);
-#if !defined(NO_B_MALLOC)
if (bp->b_flags & B_MALLOC)
panic("allocbuf: VMIO buffer can't be malloced");
-#endif
/*
* Set B_CACHE initially if buffer is 0 length or will become
* 0-length.
OpenPOWER on IntegriCloud