From fca2cf71cc88b832f5e93f0288867997cb0d35d4 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 14 May 2004 04:00:35 +0000 Subject: use pool for namei pathbuf. testing ok millert@ tdeval@ --- sys/isofs/cd9660/cd9660_vnops.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sys/isofs/cd9660/cd9660_vnops.c') diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 5bf3fcecc97..8fe48179ddd 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vnops.c,v 1.29 2003/09/23 16:51:12 millert Exp $ */ +/* $OpenBSD: cd9660_vnops.c,v 1.30 2004/05/14 04:00:34 tedu Exp $ */ /* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */ /*- @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -97,7 +98,7 @@ cd9660_mknod(ndp, vap, cred, p) struct proc *p; { #ifndef ISODEVMAP - free(ndp->ni_pnbuf, M_NAMEI); + pool_put(i&namei_pool, ndp->ni_pnbuf); vput(ndp->ni_dvp); vput(ndp->ni_vp); return (EINVAL); @@ -113,7 +114,7 @@ cd9660_mknod(ndp, vap, cred, p) if (ip->i_mnt->iso_ftype != ISO_FTYPE_RRIP || vap->va_type != vp->v_type || (vap->va_type != VCHR && vap->va_type != VBLK)) { - free(ndp->ni_pnbuf, M_NAMEI); + pool_put(&namei_pool, ndp->ni_pnbuf); vput(ndp->ni_dvp); vput(ndp->ni_vp); return (EINVAL); @@ -795,7 +796,7 @@ cd9660_readlink(v) uio->uio_iov->iov_len >= MAXPATHLEN) symname = uio->uio_iov->iov_base; else - MALLOC(symname, char *, MAXPATHLEN, M_NAMEI, M_WAITOK); + symname = pool_get(&namei_pool, PR_WAITOK); /* * Ok, we just gathering a symbolic name in SL record. @@ -803,7 +804,7 @@ cd9660_readlink(v) if (cd9660_rrip_getsymname(dirp, symname, &symlen, imp) == 0) { if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iov->iov_len < MAXPATHLEN) - FREE(symname, M_NAMEI); + pool_put(&namei_pool, symname); brelse(bp); return (EINVAL); } @@ -818,7 +819,7 @@ cd9660_readlink(v) if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iov->iov_len < MAXPATHLEN) { error = uiomove(symname, symlen, uio); - FREE(symname, M_NAMEI); + pool_put(&namei_pool, symname); return (error); } uio->uio_resid -= symlen; -- cgit v1.2.3