diff options
Diffstat (limited to 'sys/nfsclient/nfs_vfsops.c')
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index bc6f3c0..c70600f 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -101,14 +101,14 @@ static void nfs_decode_args __P((struct nfsmount *nmp, static int mountnfs __P((struct nfs_args *,struct mount *, struct sockaddr *,char *,char *,struct vnode **)); static int nfs_mount __P(( struct mount *mp, char *path, caddr_t data, - struct nameidata *ndp, struct proc *p)); + struct nameidata *ndp, struct thread *p)); static int nfs_unmount __P(( struct mount *mp, int mntflags, - struct proc *p)); + struct thread *p)); static int nfs_root __P(( struct mount *mp, struct vnode **vpp)); static int nfs_statfs __P(( struct mount *mp, struct statfs *sbp, - struct proc *p)); + struct thread *p)); static int nfs_sync __P(( struct mount *mp, int waitfor, - struct ucred *cred, struct proc *p)); + struct ucred *cred, struct thread *p)); /* * nfs vfs operations. @@ -161,7 +161,7 @@ SYSCTL_OPAQUE(_vfs_nfs, OID_AUTO, diskless_swapaddr, CTLFLAG_RD, void nfsargs_ntoh __P((struct nfs_args *)); static int nfs_mountdiskless __P((char *, char *, int, struct sockaddr_in *, struct nfs_args *, - struct proc *, struct vnode **, + struct thread *, struct vnode **, struct mount **)); static void nfs_convert_diskless __P((void)); static void nfs_convert_oargs __P((struct nfs_args *args, @@ -241,10 +241,10 @@ nfs_convert_diskless() * nfs statfs call */ int -nfs_statfs(mp, sbp, p) +nfs_statfs(mp, sbp, td) struct mount *mp; register struct statfs *sbp; - struct proc *p; + struct thread *td; { register struct vnode *vp; register struct nfs_statfs *sfp; @@ -266,11 +266,11 @@ nfs_statfs(mp, sbp, p) return (error); vp = NFSTOV(np); if (v3 && (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) - (void)nfs_fsinfo(nmp, vp, p->p_ucred, p); + (void)nfs_fsinfo(nmp, vp, td->td_proc->p_ucred, td); nfsstats.rpccnt[NFSPROC_FSSTAT]++; nfsm_reqhead(vp, NFSPROC_FSSTAT, NFSX_FH(v3)); nfsm_fhtom(vp, v3); - nfsm_request(vp, NFSPROC_FSSTAT, p, p->p_ucred); + nfsm_request(vp, NFSPROC_FSSTAT, td, td->td_proc->p_ucred); if (v3) nfsm_postop_attr(vp, retattr); if (error) { @@ -315,11 +315,11 @@ nfs_statfs(mp, sbp, p) * nfs version 3 fsinfo rpc call */ int -nfs_fsinfo(nmp, vp, cred, p) +nfs_fsinfo(nmp, vp, cred, td) register struct nfsmount *nmp; register struct vnode *vp; struct ucred *cred; - struct proc *p; + struct thread *td; { register struct nfsv3_fsinfo *fsp; register caddr_t cp; @@ -333,7 +333,7 @@ nfs_fsinfo(nmp, vp, cred, p) nfsstats.rpccnt[NFSPROC_FSINFO]++; nfsm_reqhead(vp, NFSPROC_FSINFO, NFSX_FH(1)); nfsm_fhtom(vp, 1); - nfsm_request(vp, NFSPROC_FSINFO, p, cred); + nfsm_request(vp, NFSPROC_FSINFO, td, cred); nfsm_postop_attr(vp, retattr); if (!error) { nfsm_dissect(fsp, struct nfsv3_fsinfo *, NFSX_V3FSINFO); @@ -394,7 +394,7 @@ nfs_mountroot(mp) struct nfsv3_diskless *nd = &nfsv3_diskless; struct socket *so; struct vnode *vp; - struct proc *p = curproc; /* XXX */ + struct thread *td = curthread; /* XXX */ int error, i; u_long l; char buf[128]; @@ -433,7 +433,7 @@ nfs_mountroot(mp) * Do enough of ifconfig(8) so that the critical net interface can * talk to the server. */ - error = socreate(nd->myif.ifra_addr.sa_family, &so, SOCK_DGRAM, 0, p); + error = socreate(nd->myif.ifra_addr.sa_family, &so, SOCK_DGRAM, 0, td); if (error) panic("nfs_mountroot: socreate(%04x): %d", nd->myif.ifra_addr.sa_family, error); @@ -449,12 +449,12 @@ nfs_mountroot(mp) nd->myif.ifra_name[i] >= '0' && nd->myif.ifra_name[i] <= '9'; nd->myif.ifra_name[i] ++) { - error = ifioctl(so, SIOCAIFADDR, (caddr_t)&nd->myif, p); + error = ifioctl(so, SIOCAIFADDR, (caddr_t)&nd->myif, td); if(!error) break; } #endif - error = ifioctl(so, SIOCAIFADDR, (caddr_t)&nd->myif, p); + error = ifioctl(so, SIOCAIFADDR, (caddr_t)&nd->myif, td); if (error) panic("nfs_mountroot: SIOCAIFADDR: %d", error); soclose(so); @@ -488,7 +488,7 @@ nfs_mountroot(mp) (l >> 8) & 0xff, (l >> 0) & 0xff,nd->root_hostnam); printf("NFS ROOT: %s\n",buf); if ((error = nfs_mountdiskless(buf, "/", MNT_RDONLY, - &nd->root_saddr, &nd->root_args, p, &vp, &mp)) != 0) { + &nd->root_saddr, &nd->root_args, td, &vp, &mp)) != 0) { if (swap_mp) { mp->mnt_vfc->vfc_refcount--; free(swap_mp, M_MOUNT); @@ -514,9 +514,9 @@ nfs_mountroot(mp) (l >> 8) & 0xff, (l >> 0) & 0xff,nd->swap_hostnam); printf("NFS SWAP: %s\n",buf); if ((error = nfs_mountdiskless(buf, "/swap", 0, - &nd->swap_saddr, &nd->swap_args, p, &vp, &swap_mp)) != 0) + &nd->swap_saddr, &nd->swap_args, td, &vp, &swap_mp)) != 0) return (error); - vfs_unbusy(swap_mp, p); + vfs_unbusy(swap_mp, td); VTONFS(vp)->n_size = VTONFS(vp)->n_vattr.va_size = nd->swap_nblks * DEV_BSIZE ; @@ -528,13 +528,13 @@ nfs_mountroot(mp) vp->v_type = VREG; vp->v_flag = 0; VREF(vp); - swaponvp(p, vp, NODEV, nd->swap_nblks); + swaponvp(td, vp, NODEV, nd->swap_nblks); } mp->mnt_flag |= MNT_ROOTFS; mp->mnt_vnodecovered = NULLVP; rootvp = vp; - vfs_unbusy(mp, p); + vfs_unbusy(mp, td); /* * This is not really an nfs issue, but it is much easier to @@ -554,13 +554,13 @@ nfs_mountroot(mp) * Internal version of mount system call for diskless setup. */ static int -nfs_mountdiskless(path, which, mountflag, sin, args, p, vpp, mpp) +nfs_mountdiskless(path, which, mountflag, sin, args, td, vpp, mpp) char *path; char *which; int mountflag; struct sockaddr_in *sin; struct nfs_args *args; - struct proc *p; + struct thread *td; struct vnode **vpp; struct mount **mpp; { @@ -581,7 +581,7 @@ nfs_mountdiskless(path, which, mountflag, sin, args, p, vpp, mpp) if ((error = mountnfs(args, mp, nam, which, path, vpp)) != 0) { printf("nfs_mountroot: mount %s on %s: %d", path, which, error); mp->mnt_vfc->vfc_refcount--; - vfs_unbusy(mp, p); + vfs_unbusy(mp, td); free(mp, M_MOUNT); FREE(nam, M_SONAME); return (error); @@ -750,12 +750,12 @@ nfs_decode_args(nmp, argp) */ /* ARGSUSED */ static int -nfs_mount(mp, path, data, ndp, p) +nfs_mount(mp, path, data, ndp, td) struct mount *mp; char *path; caddr_t data; struct nameidata *ndp; - struct proc *p; + struct thread *td; { int error; struct nfs_args args; @@ -930,12 +930,12 @@ mountnfs(argp, mp, nam, pth, hst, vpp) * Get file attributes for the mountpoint. This has the side * effect of filling in (*vpp)->v_type with the correct value. */ - VOP_GETATTR(*vpp, &attrs, curproc->p_ucred, curproc); + VOP_GETATTR(*vpp, &attrs, curthread->td_proc->p_ucred, curthread); /* * Lose the lock but keep the ref. */ - VOP_UNLOCK(*vpp, 0, curproc); + VOP_UNLOCK(*vpp, 0, curthread); return (0); bad: @@ -949,10 +949,10 @@ bad: * unmount system call */ static int -nfs_unmount(mp, mntflags, p) +nfs_unmount(mp, mntflags, td) struct mount *mp; int mntflags; - struct proc *p; + struct thread *td; { register struct nfsmount *nmp; int error, flags = 0; @@ -1027,11 +1027,11 @@ extern int syncprt; */ /* ARGSUSED */ static int -nfs_sync(mp, waitfor, cred, p) +nfs_sync(mp, waitfor, cred, td) struct mount *mp; int waitfor; struct ucred *cred; - struct proc *p; + struct thread *td; { struct vnode *vp, *vnp; int error, allerror = 0; @@ -1059,11 +1059,11 @@ loop: mtx_lock(&mntvnode_mtx); continue; } - if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) { + if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) { mtx_lock(&mntvnode_mtx); goto loop; } - error = VOP_FSYNC(vp, cred, waitfor, p); + error = VOP_FSYNC(vp, cred, waitfor, td); if (error) allerror = error; vput(vp); |