diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-08-09 10:14:03 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-08-09 10:14:03 +0000 |
commit | 438407ddf18815478fb586feb0444b01488e7c67 (patch) | |
tree | cf7dc174aed3bc3f033e99276ac5b355d6fcd144 /sys/nfs/nfs_vnops.c | |
parent | 690491d0cc42772963d6764f43e2ffc506b42f15 (diff) |
o nfs_vinvalbuf() is always called with the intrflag as 1, and then
checks if the mount is actually interrutable, and if not sets it 0.
remove this argument from nfs_vinvalbuf and just do the checking inside
the function.
o give nfs_vinvalbuf() a makeover so it looks nice. (spacing, casts, &c);
o Actually pass PCATCH too tsleep() if the mount it interrutable.
ok art@, blambert@
Diffstat (limited to 'sys/nfs/nfs_vnops.c')
-rw-r--r-- | sys/nfs/nfs_vnops.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index bbc567179fc..9391c5cdc3e 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.100 2008/08/08 20:44:38 blambert Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.101 2008/08/09 10:14:02 thib Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -398,8 +398,8 @@ nfs_open(v) } if (np->n_flag & NMODIFIED) { - if ((error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, - ap->a_p, 1)) == EINTR) + error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_p); + if (error == EINTR) return (error); uvm_vnp_uncache(vp); np->n_attrstamp = 0; @@ -416,8 +416,8 @@ nfs_open(v) if (np->n_mtime != vattr.va_mtime.tv_sec) { if (vp->v_type == VDIR) np->n_direofoffset = 0; - if ((error = nfs_vinvalbuf(vp, V_SAVE, - ap->a_cred, ap->a_p, 1)) == EINTR) + error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_p); + if (error == EINTR); return (error); uvm_vnp_uncache(vp); np->n_mtime = vattr.va_mtime.tv_sec; @@ -469,7 +469,7 @@ nfs_close(v) error = nfs_flush(vp, ap->a_cred, MNT_WAIT, ap->a_p, 0); np->n_flag &= ~NMODIFIED; } else - error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_p, 1); + error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_p); np->n_attrstamp = 0; } if (np->n_flag & NWRITEERR) { @@ -570,10 +570,10 @@ nfs_setattr(v) return (EROFS); if (vap->va_size == 0) error = nfs_vinvalbuf(vp, 0, - ap->a_cred, ap->a_p, 1); + ap->a_cred, ap->a_p); else error = nfs_vinvalbuf(vp, V_SAVE, - ap->a_cred, ap->a_p, 1); + ap->a_cred, ap->a_p); if (error) return (error); tsize = np->n_size; @@ -584,7 +584,7 @@ nfs_setattr(v) vap->va_atime.tv_sec != VNOVAL) && vp->v_type == VREG && (error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, - ap->a_p, 1)) == EINTR) + ap->a_p)) == EINTR) return (error); error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p); if (error && vap->va_size != VNOVAL) { @@ -1396,7 +1396,7 @@ nfs_remove(v) * throw away biocache buffers, mainly to avoid * unnecessary delayed writes later. */ - error = nfs_vinvalbuf(vp, 0, cnp->cn_cred, cnp->cn_proc, 1); + error = nfs_vinvalbuf(vp, 0, cnp->cn_cred, cnp->cn_proc); /* Do the rpc */ if (error != EINTR) error = nfs_removerpc(dvp, cnp->cn_nameptr, |