diff options
author | Eric Jackson <ericj@cvs.openbsd.org> | 2002-01-16 21:51:17 +0000 |
---|---|---|
committer | Eric Jackson <ericj@cvs.openbsd.org> | 2002-01-16 21:51:17 +0000 |
commit | c24ee034e7d103f1e92d1f865c2f9e41d132aa87 (patch) | |
tree | e0a2292ac9720fa3fefa0481a851d2c8922b51d3 /sys/nfs/nfs_vnops.c | |
parent | 1813aeecff2a418dce045f310ec1cb9843702ade (diff) |
use queue.h macro's
remove register
Diffstat (limited to 'sys/nfs/nfs_vnops.c')
-rw-r--r-- | sys/nfs/nfs_vnops.c | 272 |
1 files changed, 136 insertions, 136 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 14c28a1e302..c4dd3e30242 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.46 2001/12/22 09:58:04 art Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.47 2002/01/16 21:51:16 ericj Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -269,10 +269,10 @@ nfs_access(v) struct ucred *a_cred; struct proc *a_p; } */ *ap = v; - register struct vnode *vp = ap->a_vp; - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + struct vnode *vp = ap->a_vp; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; caddr_t bpos, dpos, cp2; int error = 0, attrflag; struct mbuf *mreq, *mrep, *md, *mb, *mb2; @@ -361,7 +361,7 @@ nfs_open(v) struct ucred *a_cred; struct proc *a_p; } */ *ap = v; - register struct vnode *vp = ap->a_vp; + struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); struct vattr vattr; int error; @@ -462,8 +462,8 @@ nfs_close(v) struct ucred *a_cred; struct proc *a_p; } */ *ap = v; - register struct vnode *vp = ap->a_vp; - register struct nfsnode *np = VTONFS(vp); + struct vnode *vp = ap->a_vp; + struct nfsnode *np = VTONFS(vp); int error = 0; if (vp->v_type == VREG) { @@ -496,11 +496,11 @@ nfs_getattr(v) struct ucred *a_cred; struct proc *a_p; } */ *ap = v; - register struct vnode *vp = ap->a_vp; - register struct nfsnode *np = VTONFS(vp); - register caddr_t cp; - register u_int32_t *tl; - register int32_t t1, t2; + struct vnode *vp = ap->a_vp; + struct nfsnode *np = VTONFS(vp); + caddr_t cp; + u_int32_t *tl; + int32_t t1, t2; caddr_t bpos, dpos; int error = 0; struct mbuf *mreq, *mrep, *md, *mb, *mb2; @@ -540,9 +540,9 @@ nfs_setattr(v) struct ucred *a_cred; struct proc *a_p; } */ *ap = v; - register struct vnode *vp = ap->a_vp; - register struct nfsnode *np = VTONFS(vp); - register struct vattr *vap = ap->a_vap; + struct vnode *vp = ap->a_vp; + struct nfsnode *np = VTONFS(vp); + struct vattr *vap = ap->a_vap; int error = 0; u_quad_t tsize = 0; @@ -619,9 +619,9 @@ nfs_setattrrpc(vp, vap, cred, procp) struct ucred *cred; struct proc *procp; { - register struct nfsv2_sattr *sp; - register caddr_t cp; - register int32_t t1, t2; + struct nfsv2_sattr *sp; + caddr_t cp; + int32_t t1, t2; caddr_t bpos, dpos, cp2; u_int32_t *tl; int error = 0, wccflag = NFSV3_WCCRATTR; @@ -677,15 +677,15 @@ nfs_lookup(v) struct vnode **a_vpp; struct componentname *a_cnp; } */ *ap = v; - register struct componentname *cnp = ap->a_cnp; - register struct vnode *dvp = ap->a_dvp; - register struct vnode **vpp = ap->a_vpp; + struct componentname *cnp = ap->a_cnp; + struct vnode *dvp = ap->a_dvp; + struct vnode **vpp = ap->a_vpp; struct proc *p = cnp->cn_proc; - register int flags = cnp->cn_flags; - register struct vnode *newvp; - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + int flags = cnp->cn_flags; + struct vnode *newvp; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; struct nfsmount *nmp; caddr_t bpos, dpos, cp2; struct mbuf *mreq, *mrep, *md, *mb, *mb2; @@ -834,7 +834,7 @@ nfs_read(v) int a_ioflag; struct ucred *a_cred; } */ *ap = v; - register struct vnode *vp = ap->a_vp; + struct vnode *vp = ap->a_vp; if (vp->v_type != VREG) return (EPERM); @@ -853,7 +853,7 @@ nfs_readlink(v) struct uio *a_uio; struct ucred *a_cred; } */ *ap = v; - register struct vnode *vp = ap->a_vp; + struct vnode *vp = ap->a_vp; if (vp->v_type != VLNK) return (EPERM); @@ -866,13 +866,13 @@ nfs_readlink(v) */ int nfs_readlinkrpc(vp, uiop, cred) - register struct vnode *vp; + struct vnode *vp; struct uio *uiop; struct ucred *cred; { - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; caddr_t bpos, dpos, cp2; int error = 0, len, attrflag; struct mbuf *mreq, *mrep, *md, *mb, *mb2; @@ -997,7 +997,7 @@ nfs_writerpc(vp, uiop, iomode, must_commit) *tl++ = txdr_unsigned(*iomode); *tl = txdr_unsigned(len); } else { - register u_int32_t x; + u_int32_t x; nfsm_build(tl, u_int32_t *, 4 * NFSX_UNSIGNED); /* Set both "begin" and "current" to non-garbage. */ @@ -1073,15 +1073,15 @@ nfsmout: */ int nfs_mknodrpc(dvp, vpp, cnp, vap) - register struct vnode *dvp; - register struct vnode **vpp; - register struct componentname *cnp; - register struct vattr *vap; + struct vnode *dvp; + struct vnode **vpp; + struct componentname *cnp; + struct vattr *vap; { - register struct nfsv2_sattr *sp; - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + struct nfsv2_sattr *sp; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; struct vnode *newvp = (struct vnode *)0; struct nfsnode *np; char *cp2; @@ -1194,13 +1194,13 @@ nfs_create(v) struct componentname *a_cnp; struct vattr *a_vap; } */ *ap = v; - register struct vnode *dvp = ap->a_dvp; - register struct vattr *vap = ap->a_vap; - register struct componentname *cnp = ap->a_cnp; - register struct nfsv2_sattr *sp; - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + struct vnode *dvp = ap->a_dvp; + struct vattr *vap = ap->a_vap; + struct componentname *cnp = ap->a_cnp; + struct nfsv2_sattr *sp; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; struct nfsnode *np = (struct nfsnode *)0; struct vnode *newvp = (struct vnode *)0; caddr_t bpos, dpos, cp2; @@ -1229,8 +1229,8 @@ again: if (fmode & O_EXCL) { *tl = txdr_unsigned(NFSV3CREATE_EXCLUSIVE); nfsm_build(tl, u_int32_t *, NFSX_V3CREATEVERF); - if (in_ifaddr.tqh_first) - *tl++ = in_ifaddr.tqh_first->ia_addr.sin_addr.s_addr; + if (TAILQ_FIRST(&in_ifaddr)) + *tl++ = TAILQ_FIRST(&in_ifaddr)->ia_addr.sin_addr.s_addr; else *tl++ = create_verf; *tl = ++create_verf; @@ -1307,10 +1307,10 @@ nfs_remove(v) struct vnode * a_vp; struct componentname * a_cnp; } */ *ap = v; - register struct vnode *vp = ap->a_vp; - register struct vnode *dvp = ap->a_dvp; - register struct componentname *cnp = ap->a_cnp; - register struct nfsnode *np = VTONFS(vp); + struct vnode *vp = ap->a_vp; + struct vnode *dvp = ap->a_dvp; + struct componentname *cnp = ap->a_cnp; + struct nfsnode *np = VTONFS(vp); int error = 0; struct vattr vattr; @@ -1364,7 +1364,7 @@ nfs_remove(v) */ int nfs_removeit(sp) - register struct sillyrename *sp; + struct sillyrename *sp; { return (nfs_removerpc(sp->s_dvp, sp->s_name, sp->s_namlen, sp->s_cred, @@ -1376,15 +1376,15 @@ nfs_removeit(sp) */ int nfs_removerpc(dvp, name, namelen, cred, proc) - register struct vnode *dvp; + struct vnode *dvp; char *name; int namelen; struct ucred *cred; struct proc *proc; { - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; caddr_t bpos, dpos, cp2; int error = 0, wccflag = NFSV3_WCCRATTR; struct mbuf *mreq, *mrep, *md, *mb, *mb2; @@ -1420,12 +1420,12 @@ nfs_rename(v) struct vnode *a_tvp; struct componentname *a_tcnp; } */ *ap = v; - register struct vnode *fvp = ap->a_fvp; - register struct vnode *tvp = ap->a_tvp; - register struct vnode *fdvp = ap->a_fdvp; - register struct vnode *tdvp = ap->a_tdvp; - register struct componentname *tcnp = ap->a_tcnp; - register struct componentname *fcnp = ap->a_fcnp; + struct vnode *fvp = ap->a_fvp; + struct vnode *tvp = ap->a_tvp; + struct vnode *fdvp = ap->a_fdvp; + struct vnode *tdvp = ap->a_tdvp; + struct componentname *tcnp = ap->a_tcnp; + struct componentname *fcnp = ap->a_fcnp; int error; #ifndef DIAGNOSTIC @@ -1483,7 +1483,7 @@ int nfs_renameit(sdvp, scnp, sp) struct vnode *sdvp; struct componentname *scnp; - register struct sillyrename *sp; + struct sillyrename *sp; { return (nfs_renamerpc(sdvp, scnp->cn_nameptr, scnp->cn_namelen, sdvp, sp->s_name, sp->s_namlen, scnp->cn_cred, scnp->cn_proc)); @@ -1494,18 +1494,18 @@ nfs_renameit(sdvp, scnp, sp) */ int nfs_renamerpc(fdvp, fnameptr, fnamelen, tdvp, tnameptr, tnamelen, cred, proc) - register struct vnode *fdvp; + struct vnode *fdvp; char *fnameptr; int fnamelen; - register struct vnode *tdvp; + struct vnode *tdvp; char *tnameptr; int tnamelen; struct ucred *cred; struct proc *proc; { - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; caddr_t bpos, dpos, cp2; int error = 0, fwccflag = NFSV3_WCCRATTR, twccflag = NFSV3_WCCRATTR; struct mbuf *mreq, *mrep, *md, *mb, *mb2; @@ -1546,12 +1546,12 @@ nfs_link(v) struct vnode *a_vp; struct componentname *a_cnp; } */ *ap = v; - register struct vnode *vp = ap->a_vp; - register struct vnode *dvp = ap->a_dvp; - register struct componentname *cnp = ap->a_cnp; - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + struct vnode *vp = ap->a_vp; + struct vnode *dvp = ap->a_dvp; + struct componentname *cnp = ap->a_cnp; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; caddr_t bpos, dpos, cp2; int error = 0, wccflag = NFSV3_WCCRATTR, attrflag = 0; struct mbuf *mreq, *mrep, *md, *mb, *mb2; @@ -1615,13 +1615,13 @@ nfs_symlink(v) struct vattr *a_vap; char *a_target; } */ *ap = v; - register struct vnode *dvp = ap->a_dvp; - register struct vattr *vap = ap->a_vap; - register struct componentname *cnp = ap->a_cnp; - register struct nfsv2_sattr *sp; - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + struct vnode *dvp = ap->a_dvp; + struct vattr *vap = ap->a_vap; + struct componentname *cnp = ap->a_cnp; + struct nfsv2_sattr *sp; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; caddr_t bpos, dpos, cp2; int slen, error = 0, wccflag = NFSV3_WCCRATTR, gotvp; struct mbuf *mreq, *mrep, *md, *mb, *mb2; @@ -1681,14 +1681,14 @@ nfs_mkdir(v) struct componentname *a_cnp; struct vattr *a_vap; } */ *ap = v; - register struct vnode *dvp = ap->a_dvp; - register struct vattr *vap = ap->a_vap; - register struct componentname *cnp = ap->a_cnp; - register struct nfsv2_sattr *sp; - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; - register int len; + struct vnode *dvp = ap->a_dvp; + struct vattr *vap = ap->a_vap; + struct componentname *cnp = ap->a_cnp; + struct nfsv2_sattr *sp; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; + int len; struct nfsnode *np = (struct nfsnode *)0; struct vnode *newvp = (struct vnode *)0; caddr_t bpos, dpos, cp2; @@ -1762,12 +1762,12 @@ nfs_rmdir(v) struct vnode *a_vp; struct componentname *a_cnp; } */ *ap = v; - register struct vnode *vp = ap->a_vp; - register struct vnode *dvp = ap->a_dvp; - register struct componentname *cnp = ap->a_cnp; - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + struct vnode *vp = ap->a_vp; + struct vnode *dvp = ap->a_dvp; + struct componentname *cnp = ap->a_cnp; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; caddr_t bpos, dpos, cp2; int error = 0, wccflag = NFSV3_WCCRATTR; struct mbuf *mreq, *mrep, *md, *mb, *mb2; @@ -1990,12 +1990,12 @@ nfs_readdirrpc(struct vnode *vp, struct ucred *cred, int *end_of_directory) { - register int len, left; + int len, left; struct nfs_dirent *ndp = NULL; - register struct dirent *dp = NULL; - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + struct dirent *dp = NULL; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; caddr_t bpos, dpos, cp2; struct mbuf *mreq, *mrep, *md, *mb, *mb2; nfsuint64 cookie; @@ -2174,13 +2174,13 @@ int nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, int *end_of_directory) { - register int len, left; + int len, left; struct nfs_dirent *ndirp = NULL; - register struct dirent *dp = NULL; - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; - register struct vnode *newvp; + struct dirent *dp = NULL; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; + struct vnode *newvp; caddr_t bpos, dpos, cp2, dpossav1, dpossav2; struct mbuf *mreq, *mrep, *md, *mb, *mb2, *mdsav1, *mdsav2; struct nameidata nami, *ndp = &nami; @@ -2400,7 +2400,7 @@ nfs_sillyrename(dvp, vp, cnp) struct vnode *dvp, *vp; struct componentname *cnp; { - register struct sillyrename *sp; + struct sillyrename *sp; struct nfsnode *np; int error; @@ -2456,16 +2456,16 @@ bad: */ int nfs_lookitup(dvp, name, len, cred, procp, npp) - register struct vnode *dvp; + struct vnode *dvp; char *name; int len; struct ucred *cred; struct proc *procp; struct nfsnode **npp; { - register u_int32_t *tl; - register caddr_t cp; - register int32_t t1, t2; + u_int32_t *tl; + caddr_t cp; + int32_t t1, t2; struct vnode *newvp = (struct vnode *)0; struct nfsnode *np, *dnp = VTONFS(dvp); caddr_t bpos, dpos, cp2; @@ -2586,7 +2586,7 @@ nfs_bmap(v) daddr_t *a_bnp; int *a_runp; } */ *ap = v; - register struct vnode *vp = ap->a_vp; + struct vnode *vp = ap->a_vp; if (ap->a_vpp != NULL) *ap->a_vpp = vp; @@ -2686,8 +2686,8 @@ again: bvecpos = 0; if (NFS_ISV3(vp) && commit) { s = splbio(); - for (bp = vp->v_dirtyblkhd.lh_first; bp; bp = nbp) { - nbp = bp->b_vnbufs.le_next; + for (bp = LIST_FIRST(&vp->v_dirtyblkhd); bp != NULL; bp = nbp) { + nbp = LIST_NEXT(bp, b_vnbufs); if (bvecpos >= NFS_COMMITBVECSIZ) break; if ((bp->b_flags & (B_BUSY | B_DELWRI | B_NEEDCOMMIT)) @@ -2748,8 +2748,8 @@ again: */ loop: s = splbio(); - for (bp = vp->v_dirtyblkhd.lh_first; bp; bp = nbp) { - nbp = bp->b_vnbufs.le_next; + for (bp = LIST_FIRST(&vp->v_dirtyblkhd); bp != NULL; bp = nbp) { + nbp = LIST_NEXT(bp, b_vnbufs); if (bp->b_flags & B_BUSY) { if (waitfor != MNT_WAIT || passone) continue; @@ -2799,8 +2799,8 @@ loop: } goto loop2; } - - if (vp->v_dirtyblkhd.lh_first && commit) { + + if (LIST_FIRST(&vp->v_dirtyblkhd) && commit) { #if 0 vprint("nfs_fsync: dirty", vp); #endif @@ -2850,7 +2850,7 @@ nfs_advlock(v) struct flock *a_fl; int a_flags; } */ *ap = v; - register struct nfsnode *np = VTONFS(ap->a_vp); + struct nfsnode *np = VTONFS(ap->a_vp); return (lf_advlock(&np->n_lockf, np->n_size, ap->a_id, ap->a_op, ap->a_fl, ap->a_flags)); @@ -2866,8 +2866,8 @@ nfs_print(v) struct vop_print_args /* { struct vnode *a_vp; } */ *ap = v; - register struct vnode *vp = ap->a_vp; - register struct nfsnode *np = VTONFS(vp); + struct vnode *vp = ap->a_vp; + struct nfsnode *np = VTONFS(vp); printf("tag VT_NFS, fileid %ld fsid 0x%lx", np->n_vattr.va_fileid, np->n_vattr.va_fsid); @@ -2899,11 +2899,11 @@ nfs_bwrite(v) */ int nfs_writebp(bp, force) - register struct buf *bp; + struct buf *bp; int force; { - register int oldflags = bp->b_flags, retv = 1; - register struct proc *p = curproc; /* XXX */ + int oldflags = bp->b_flags, retv = 1; + struct proc *p = curproc; /* XXX */ off_t off; int s; @@ -3018,7 +3018,7 @@ nfsspec_read(v) int a_ioflag; struct ucred *a_cred; } */ *ap = v; - register struct nfsnode *np = VTONFS(ap->a_vp); + struct nfsnode *np = VTONFS(ap->a_vp); /* * Set access flag. @@ -3042,7 +3042,7 @@ nfsspec_write(v) int a_ioflag; struct ucred *a_cred; } */ *ap = v; - register struct nfsnode *np = VTONFS(ap->a_vp); + struct nfsnode *np = VTONFS(ap->a_vp); /* * Set update flag. @@ -3068,8 +3068,8 @@ nfsspec_close(v) struct ucred *a_cred; struct proc *a_p; } */ *ap = v; - register struct vnode *vp = ap->a_vp; - register struct nfsnode *np = VTONFS(vp); + struct vnode *vp = ap->a_vp; + struct nfsnode *np = VTONFS(vp); struct vattr vattr; if (np->n_flag & (NACC | NUPD)) { @@ -3102,7 +3102,7 @@ nfsfifo_read(v) struct ucred *a_cred; } */ *ap = v; extern int (**fifo_vnodeop_p) __P((void *)); - register struct nfsnode *np = VTONFS(ap->a_vp); + struct nfsnode *np = VTONFS(ap->a_vp); /* * Set access flag. @@ -3127,7 +3127,7 @@ nfsfifo_write(v) struct ucred *a_cred; } */ *ap = v; extern int (**fifo_vnodeop_p) __P((void *)); - register struct nfsnode *np = VTONFS(ap->a_vp); + struct nfsnode *np = VTONFS(ap->a_vp); /* * Set update flag. @@ -3153,8 +3153,8 @@ nfsfifo_close(v) struct ucred *a_cred; struct proc *a_p; } */ *ap = v; - register struct vnode *vp = ap->a_vp; - register struct nfsnode *np = VTONFS(vp); + struct vnode *vp = ap->a_vp; + struct nfsnode *np = VTONFS(vp); struct vattr vattr; extern int (**fifo_vnodeop_p) __P((void *)); |