From f3b673b4a9cc4ac1ca9914931bd4c0051799200a Mon Sep 17 00:00:00 2001 From: jlemon Date: Sat, 25 Nov 2000 07:16:06 +0000 Subject: Update to reflect the disappearance of getsock(). Found by: LINT --- sys/fs/portalfs/portal_vfsops.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sys/fs') diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c index 950d383..139746d 100644 --- a/sys/fs/portalfs/portal_vfsops.c +++ b/sys/fs/portalfs/portal_vfsops.c @@ -97,12 +97,14 @@ portal_mount(mp, path, data, ndp, p) if (error) return (error); - error = getsock(p->p_fd, args.pa_socket, &fp); + error = holdsock(p->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) + if (so->so_proto->pr_domain->dom_family != AF_UNIX) { + fdrop(fp, p); return (ESOCKTNOSUPPORT); + } MALLOC(pn, struct portalnode *, sizeof(struct portalnode), M_TEMP, M_WAITOK); @@ -114,6 +116,7 @@ portal_mount(mp, path, data, ndp, p) if (error) { FREE(fmp, M_PORTALFSMNT); FREE(pn, M_TEMP); + fdrop(fp, p); return (error); } @@ -142,6 +145,7 @@ portal_mount(mp, path, data, ndp, p) #endif (void)portal_statfs(mp, &mp->mnt_stat, p); + fdrop(fp, p); return (0); } -- cgit v1.1