summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-08-24 13:28:16 +0000
committerdg <dg@FreeBSD.org>1995-08-24 13:28:16 +0000
commit71510114b29b693a49044a13f4479a4cc1005f16 (patch)
tree47163fbadb5c62f0ba1ba524e2a7187dbebb621e
parentd0bcef8ee69819e363d3a6a4b1d244ac752880e1 (diff)
downloadFreeBSD-src-71510114b29b693a49044a13f4479a4cc1005f16.zip
FreeBSD-src-71510114b29b693a49044a13f4479a4cc1005f16.tar.gz
Minor optimization.
-rw-r--r--sys/kern/vfs_bio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 4b1d194..2c52f31 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: vfs_bio.c,v 1.56 1995/07/29 11:40:18 bde Exp $
+ * $Id: vfs_bio.c,v 1.57 1995/08/06 12:10:39 davidg Exp $
*/
/*
@@ -541,11 +541,12 @@ vfs_bio_awrite(struct buf * bp)
struct buf *bpa;
s = splbio();
- if( vp->v_mount && (vp->v_flag & VVMIO) &&
- (bp->b_flags & (B_CLUSTEROK | B_INVAL)) == B_CLUSTEROK) {
+ if (vp->v_mount && (vp->v_flag & VVMIO) &&
+ (bp->b_flags & (B_CLUSTEROK | B_INVAL)) == B_CLUSTEROK) {
int size = vp->v_mount->mnt_stat.f_iosize;
+ int maxcl = MAXPHYS / size;
- for (i = 1; i < MAXPHYS / size; i++) {
+ for (i = 1; i < maxcl; i++) {
if ((bpa = incore(vp, lblkno + i)) &&
((bpa->b_flags & (B_BUSY | B_DELWRI | B_CLUSTEROK | B_INVAL)) ==
(B_DELWRI | B_CLUSTEROK)) &&
@@ -924,7 +925,7 @@ allocbuf(struct buf * bp, int size)
{
int s;
- int newbsize, mbsize;
+ int newbsize;
int i;
if (!(bp->b_flags & B_BUSY))
@@ -934,7 +935,6 @@ allocbuf(struct buf * bp, int size)
/*
* Just get anonymous memory from the kernel
*/
- mbsize = ((size + DEV_BSIZE - 1) / DEV_BSIZE) * DEV_BSIZE;
newbsize = round_page(size);
if (newbsize < bp->b_bufsize) {
OpenPOWER on IntegriCloud