summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/portal/portal_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/miscfs/portal/portal_vfsops.c')
-rw-r--r--sys/miscfs/portal/portal_vfsops.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/miscfs/portal/portal_vfsops.c b/sys/miscfs/portal/portal_vfsops.c
index 6a5b1ba..500b9ef 100644
--- a/sys/miscfs/portal/portal_vfsops.c
+++ b/sys/miscfs/portal/portal_vfsops.c
@@ -35,7 +35,7 @@
*
* @(#)portal_vfsops.c 8.6 (Berkeley) 1/21/94
*
- * $Id: portal_vfsops.c,v 1.9 1995/11/16 11:24:06 bde Exp $
+ * $Id: portal_vfsops.c,v 1.10 1995/12/11 09:24:43 phk Exp $
*/
/*
@@ -105,6 +105,7 @@ portal_mount(mp, path, data, ndp, p)
struct portalmount *fmp;
struct socket *so;
struct vnode *rvp;
+ struct portalnode *pn;
u_int size;
int error;
@@ -125,14 +126,20 @@ portal_mount(mp, path, data, ndp, p)
if (so->so_proto->pr_domain->dom_family != AF_UNIX)
return (ESOCKTNOSUPPORT);
+ MALLOC(pn, struct portalnode *, sizeof(struct portalnode),
+ M_TEMP, M_WAITOK);
+
+ MALLOC(fmp, struct portalmount *, sizeof(struct portalmount),
+ M_UFSMNT, M_WAITOK); /* XXX */
+
error = getnewvnode(VT_PORTAL, mp, portal_vnodeop_p, &rvp); /* XXX */
- if (error)
+ if (error) {
+ FREE(fmp, M_UFSMNT);
+ FREE(pn, M_TEMP);
return (error);
- MALLOC(rvp->v_data, void *, sizeof(struct portalnode),
- M_TEMP, M_WAITOK);
+ }
- fmp = (struct portalmount *) malloc(sizeof(struct portalmount),
- M_UFSMNT, M_WAITOK); /* XXX */
+ rvp->v_data = pn;
rvp->v_type = VDIR;
rvp->v_flag |= VROOT;
VTOPORTAL(rvp)->pt_arg = 0;
OpenPOWER on IntegriCloud