diff options
Diffstat (limited to 'sys/fs/portalfs')
-rw-r--r-- | sys/fs/portalfs/portal_vfsops.c | 7 | ||||
-rw-r--r-- | sys/fs/portalfs/portal_vnops.c | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c index db73ef0..412e81a 100644 --- a/sys/fs/portalfs/portal_vfsops.c +++ b/sys/fs/portalfs/portal_vfsops.c @@ -136,6 +136,13 @@ portal_mount(struct mount *mp, struct thread *td) return (error); } + error = insmntque(rvp, mp); /* XXX: Too early for mpsafe fs */ + if (error != 0) { + FREE(fmp, M_PORTALFSMNT); + FREE(pn, M_TEMP); + fdrop(fp, td); + return (error); + } rvp->v_data = pn; rvp->v_type = VDIR; rvp->v_vflag |= VV_ROOT; diff --git a/sys/fs/portalfs/portal_vnops.c b/sys/fs/portalfs/portal_vnops.c index 143d634..d6c4bc5 100644 --- a/sys/fs/portalfs/portal_vnops.c +++ b/sys/fs/portalfs/portal_vnops.c @@ -154,6 +154,11 @@ portal_lookup(ap) *vpp = fvp; vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY, td); + error = insmntque(fvp, dvp->v_mount); + if (error != 0) { + *vpp = NULLVP; + return (error); + } return (0); bad:; |