From 9c835f884465beb49b53a38fe17ffd9873e433b8 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 20 Sep 1999 19:53:23 +0000 Subject: [PATCH] Initialize vp->v_maxio to its default in getnetvnode() rather than four different places in vfs_cluster.c --- sys/kern/vfs_cluster.c | 8 -------- sys/kern/vfs_export.c | 2 +- sys/kern/vfs_subr.c | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 6bfc12078f7c..50373114ea4c 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -101,8 +101,6 @@ cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp) long origtotread; error = 0; - if (vp->v_maxio == 0) - vp->v_maxio = DFLTPHYS; /* * Try to limit the amount of read-ahead by a few @@ -361,8 +359,6 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp) bp->b_bufsize = 0; bp->b_npages = 0; - if (vp->v_maxio == 0) - vp->v_maxio = DFLTPHYS; inc = btodb(size); for (bn = blkno, i = 0; i < run; ++i, bn += inc) { if (i != 0) { @@ -544,8 +540,6 @@ cluster_write(bp, filesize) int async; vp = bp->b_vp; - if (vp->v_maxio == 0) - vp->v_maxio = DFLTPHYS; if (vp->v_type == VREG) { async = vp->v_mount->mnt_flag & MNT_ASYNC; lblocksize = vp->v_mount->mnt_stat.f_iosize; @@ -671,8 +665,6 @@ cluster_wbuild(vp, size, start_lbn, len) int totalwritten = 0; int dbsize = btodb(size); - if (vp->v_maxio == 0) - vp->v_maxio = DFLTPHYS; while (len > 0) { s = splbio(); if (((tbp = gbincore(vp, start_lbn)) == NULL) || diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 6737312c436e..43f4be347a9b 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -573,7 +573,6 @@ getnewvnode(tag, mp, vops, vpp) vp->v_clen = 0; vp->v_socket = 0; vp->v_writecount = 0; /* XXX */ - vp->v_maxio = 0; } else { simple_unlock(&vnode_free_list_slock); vp = (struct vnode *) zalloc(vnode_zone); @@ -595,6 +594,7 @@ getnewvnode(tag, mp, vops, vpp) *vpp = vp; vp->v_usecount = 1; vp->v_data = 0; + vp->v_maxio = DFLTPHYS; splx(s); vfs_object_create(vp, p, p->p_ucred); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 6737312c436e..43f4be347a9b 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -573,7 +573,6 @@ getnewvnode(tag, mp, vops, vpp) vp->v_clen = 0; vp->v_socket = 0; vp->v_writecount = 0; /* XXX */ - vp->v_maxio = 0; } else { simple_unlock(&vnode_free_list_slock); vp = (struct vnode *) zalloc(vnode_zone); @@ -595,6 +594,7 @@ getnewvnode(tag, mp, vops, vpp) *vpp = vp; vp->v_usecount = 1; vp->v_data = 0; + vp->v_maxio = DFLTPHYS; splx(s); vfs_object_create(vp, p, p->p_ucred);