summaryrefslogtreecommitdiffstats
path: root/sys/fs/portalfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/portalfs')
-rw-r--r--sys/fs/portalfs/portal_vfsops.c34
-rw-r--r--sys/fs/portalfs/portal_vnops.c32
2 files changed, 33 insertions, 33 deletions
diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c
index 5c47e72..80356e4 100644
--- a/sys/fs/portalfs/portal_vfsops.c
+++ b/sys/fs/portalfs/portal_vfsops.c
@@ -62,23 +62,23 @@
static MALLOC_DEFINE(M_PORTALFSMNT, "PORTAL mount", "PORTAL mount structure");
static int portal_mount __P((struct mount *mp, char *path, caddr_t data,
- struct nameidata *ndp, struct proc *p));
+ struct nameidata *ndp, struct thread *td));
static int portal_unmount __P((struct mount *mp, int mntflags,
- struct proc *p));
+ struct thread *td));
static int portal_root __P((struct mount *mp, struct vnode **vpp));
static int portal_statfs __P((struct mount *mp, struct statfs *sbp,
- struct proc *p));
+ struct thread *td));
/*
* Mount the per-process file descriptors (/dev/fd)
*/
static int
-portal_mount(mp, path, data, ndp, p)
+portal_mount(mp, path, data, ndp, td)
struct mount *mp;
char *path;
caddr_t data;
struct nameidata *ndp;
- struct proc *p;
+ struct thread *td;
{
struct file *fp;
struct portal_args args;
@@ -99,12 +99,12 @@ portal_mount(mp, path, data, ndp, p)
if (error)
return (error);
- error = holdsock(p->p_fd, args.pa_socket, &fp);
+ error = holdsock(td->td_proc->p_fd, args.pa_socket, &fp);
if (error)
return (error);
so = (struct socket *) fp->f_data;
if (so->so_proto->pr_domain->dom_family != AF_UNIX) {
- fdrop(fp, p);
+ fdrop(fp, td);
return (ESOCKTNOSUPPORT);
}
@@ -118,7 +118,7 @@ portal_mount(mp, path, data, ndp, p)
if (error) {
FREE(fmp, M_PORTALFSMNT);
FREE(pn, M_TEMP);
- fdrop(fp, p);
+ fdrop(fp, td);
return (error);
}
@@ -144,16 +144,16 @@ portal_mount(mp, path, data, ndp, p)
bcopy("portal", mp->mnt_stat.f_mntfromname, sizeof("portal"));
#endif
- (void)portal_statfs(mp, &mp->mnt_stat, p);
- fdrop(fp, p);
+ (void)portal_statfs(mp, &mp->mnt_stat, td);
+ fdrop(fp, td);
return (0);
}
static int
-portal_unmount(mp, mntflags, p)
+portal_unmount(mp, mntflags, td)
struct mount *mp;
int mntflags;
- struct proc *p;
+ struct thread *td;
{
int error, flags = 0;
@@ -186,7 +186,7 @@ portal_unmount(mp, mntflags, p)
* Discard reference to underlying file. Must call closef because
* this may be the last reference.
*/
- closef(VFSTOPORTAL(mp)->pm_server, (struct proc *) 0);
+ closef(VFSTOPORTAL(mp)->pm_server, (struct thread *) 0);
/*
* Finally, throw away the portalmount structure
*/
@@ -200,7 +200,7 @@ portal_root(mp, vpp)
struct mount *mp;
struct vnode **vpp;
{
- struct proc *p = curproc; /* XXX */
+ struct thread *td = curthread; /* XXX */
struct vnode *vp;
/*
@@ -208,16 +208,16 @@ portal_root(mp, vpp)
*/
vp = VFSTOPORTAL(mp)->pm_root;
VREF(vp);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
*vpp = vp;
return (0);
}
static int
-portal_statfs(mp, sbp, p)
+portal_statfs(mp, sbp, td)
struct mount *mp;
struct statfs *sbp;
- struct proc *p;
+ struct thread *td;
{
sbp->f_flags = 0;
diff --git a/sys/fs/portalfs/portal_vnops.c b/sys/fs/portalfs/portal_vnops.c
index 03deb34..0e20d13 100644
--- a/sys/fs/portalfs/portal_vnops.c
+++ b/sys/fs/portalfs/portal_vnops.c
@@ -65,7 +65,7 @@
static int portal_fileid = PORTAL_ROOTFILEID+1;
-static void portal_closefd __P((struct proc *p, int fd));
+static void portal_closefd __P((struct thread *td, int fd));
static int portal_connect __P((struct socket *so, struct socket *so2));
static int portal_getattr __P((struct vop_getattr_args *ap));
static int portal_lookup __P((struct vop_lookup_args *ap));
@@ -76,15 +76,15 @@ static int portal_reclaim __P((struct vop_reclaim_args *ap));
static int portal_setattr __P((struct vop_setattr_args *ap));
static void
-portal_closefd(p, fd)
- struct proc *p;
+portal_closefd(td, fd)
+ struct thread *td;
int fd;
{
int error;
struct close_args ua;
ua.fd = fd;
- error = close(p, &ua);
+ error = close(td, &ua);
/*
* We should never get an error, and there isn't anything
* we could do if we got one, so just print a message.
@@ -204,12 +204,12 @@ portal_open(ap)
struct vnode *a_vp;
int a_mode;
struct ucred *a_cred;
- struct proc *a_p;
+ struct thread *a_td;
} */ *ap;
{
struct socket *so = 0;
struct portalnode *pt;
- struct proc *p = ap->a_p;
+ struct thread *td = ap->a_td;
struct vnode *vp = ap->a_vp;
int s;
struct uio auio;
@@ -237,7 +237,7 @@ portal_open(ap)
* to deal with the side effects. Check for this
* by testing whether the p_dupfd has been set.
*/
- if (p->p_dupfd >= 0)
+ if (td->td_dupfd >= 0)
return (ENODEV);
pt = VTOPORTAL(vp);
@@ -246,7 +246,7 @@ portal_open(ap)
/*
* Create a new socket.
*/
- error = socreate(AF_UNIX, &so, SOCK_STREAM, 0, ap->a_p);
+ error = socreate(AF_UNIX, &so, SOCK_STREAM, 0, ap->a_td);
if (error)
goto bad;
@@ -315,12 +315,12 @@ portal_open(ap)
auio.uio_iovcnt = 2;
auio.uio_rw = UIO_WRITE;
auio.uio_segflg = UIO_SYSSPACE;
- auio.uio_procp = p;
+ auio.uio_td = td;
auio.uio_offset = 0;
auio.uio_resid = aiov[0].iov_len + aiov[1].iov_len;
error = sosend(so, (struct sockaddr *) 0, &auio,
- (struct mbuf *) 0, (struct mbuf *) 0, 0, p);
+ (struct mbuf *) 0, (struct mbuf *) 0, 0 , td);
if (error)
goto bad;
@@ -392,7 +392,7 @@ portal_open(ap)
int i;
printf("portal_open: %d extra fds\n", newfds - 1);
for (i = 1; i < newfds; i++) {
- portal_closefd(p, *ip);
+ portal_closefd(td, *ip);
ip++;
}
}
@@ -401,9 +401,9 @@ portal_open(ap)
* Check that the mode the file is being opened for is a subset
* of the mode of the existing descriptor.
*/
- fp = p->p_fd->fd_ofiles[fd];
+ fp = td->td_proc->p_fd->fd_ofiles[fd];
if (((ap->a_mode & (FREAD|FWRITE)) | fp->f_flag) != fp->f_flag) {
- portal_closefd(p, fd);
+ portal_closefd(td, fd);
error = EACCES;
goto bad;
}
@@ -413,7 +413,7 @@ portal_open(ap)
* special error code (ENXIO) which causes magic things to
* happen in vn_open. The whole concept is, well, hmmm.
*/
- p->p_dupfd = fd;
+ td->td_dupfd = fd;
error = ENXIO;
bad:;
@@ -437,7 +437,7 @@ portal_getattr(ap)
struct vnode *a_vp;
struct vattr *a_vap;
struct ucred *a_cred;
- struct proc *a_p;
+ struct thread *a_td;
} */ *ap;
{
struct vnode *vp = ap->a_vp;
@@ -482,7 +482,7 @@ portal_setattr(ap)
struct vnode *a_vp;
struct vattr *a_vap;
struct ucred *a_cred;
- struct proc *a_p;
+ struct thread *a_td;
} */ *ap;
{
OpenPOWER on IntegriCloud