summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-28 17:46:30 +0000
committerphk <phk@FreeBSD.org>2002-09-28 17:46:30 +0000
commitc5be3924c32bb1aacfc27b884db5ef65f00fa7b8 (patch)
treea5034c326f3510d1978501ed060dcef7ceee5b3d /sys/kern
parentd1681a7d3dba238086a0dd9db1800002a1897f85 (diff)
downloadFreeBSD-src-c5be3924c32bb1aacfc27b884db5ef65f00fa7b8.zip
FreeBSD-src-c5be3924c32bb1aacfc27b884db5ef65f00fa7b8.tar.gz
Remove unused includes.
Clarify the intention of a while(); Move a local variable to avoid potential name-confusion.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_bio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 46d136c..d53e532 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -40,9 +40,7 @@
#include <sys/mutex.h>
#include <sys/kernel.h>
#include <sys/kthread.h>
-#include <sys/ktr.h>
#include <sys/proc.h>
-#include <sys/reboot.h>
#include <sys/resourcevar.h>
#include <sys/sysctl.h>
#include <sys/vmmeter.h>
@@ -2516,7 +2514,8 @@ geteblk(int size)
maxsize = (size + BKVAMASK) & ~BKVAMASK;
s = splbio();
- while ((bp = getnewbuf(0, 0, size, maxsize)) == 0);
+ while ((bp = getnewbuf(0, 0, size, maxsize)) == 0)
+ continue;
splx(s);
allocbuf(bp, size);
bp->b_flags |= B_INVAL; /* b_dep cleared by getnewbuf() */
@@ -2636,7 +2635,6 @@ allocbuf(struct buf *bp, int size)
}
}
} else {
- vm_page_t m;
int desiredpages;
newbsize = (size + DEV_BSIZE - 1) & ~(DEV_BSIZE - 1);
@@ -2659,6 +2657,8 @@ allocbuf(struct buf *bp, int size)
* if we have to remove any pages.
*/
if (desiredpages < bp->b_npages) {
+ vm_page_t m;
+
vm_page_lock_queues();
for (i = desiredpages; i < bp->b_npages; i++) {
/*
OpenPOWER on IntegriCloud