summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1997-09-21 04:24:27 +0000
committerdyson <dyson@FreeBSD.org>1997-09-21 04:24:27 +0000
commite64b1984f97c6d987d7d36b61a3afe5028a08312 (patch)
tree325bcf17de3aad0383fb86548872026a7c3d2599 /sys/ufs
parent1419fcb42b4e1e5a73f4574739f4c232fde357e2 (diff)
downloadFreeBSD-src-e64b1984f97c6d987d7d36b61a3afe5028a08312.zip
FreeBSD-src-e64b1984f97c6d987d7d36b61a3afe5028a08312.tar.gz
Change the M_NAMEI allocations to use the zone allocator. This change
plus the previous changes to use the zone allocator decrease the useage of malloc by half. The Zone allocator will be upgradeable to be able to use per CPU-pools, and has more intelligent usage of SPLs. Additionally, it has reasonable stats gathering capabilities, while making most calls inline.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_vnops.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 5576990..76b5b92 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
- * $Id: ufs_vnops.c,v 1.56 1997/09/02 20:06:59 bde Exp $
+ * $Id: ufs_vnops.c,v 1.57 1997/09/14 02:58:12 peter Exp $
*/
#include "opt_quota.h"
@@ -740,7 +740,7 @@ ufs_link(ap)
ip->i_nlink--;
ip->i_flag |= IN_CHANGE;
}
- FREE(cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, cnp->cn_pnbuf);
out1:
if (tdvp != vp)
VOP_UNLOCK(vp, 0, p);
@@ -800,7 +800,7 @@ ufs_whiteout(ap)
break;
}
if (cnp->cn_flags & HASBUF) {
- FREE(cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, cnp->cn_pnbuf);
cnp->cn_flags &= ~HASBUF;
}
return (error);
@@ -1342,7 +1342,7 @@ ufs_mkdir(ap)
#ifdef QUOTA
if ((error = getinoquota(ip)) ||
(error = chkiq(ip, 1, cnp->cn_cred, 0))) {
- free(cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, cnp->cn_pnbuf);
VOP_VFREE(tvp, ip->i_number, dmode);
vput(tvp);
vput(dvp);
@@ -1434,7 +1434,7 @@ bad:
} else
*ap->a_vpp = tvp;
out:
- FREE(cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, cnp->cn_pnbuf);
vput(dvp);
return (error);
#ifdef EXT2FS
@@ -1718,7 +1718,7 @@ ufs_abortop(ap)
} */ *ap;
{
if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF)
- FREE(ap->a_cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, ap->a_cnp->cn_pnbuf);
return (0);
}
@@ -2093,7 +2093,7 @@ ufs_makeinode(mode, dvp, vpp, cnp)
error = VOP_VALLOC(dvp, mode, cnp->cn_cred, &tvp);
if (error) {
- free(cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, cnp->cn_pnbuf);
vput(dvp);
return (error);
}
@@ -2103,7 +2103,7 @@ ufs_makeinode(mode, dvp, vpp, cnp)
#ifdef QUOTA
if ((error = getinoquota(ip)) ||
(error = chkiq(ip, 1, cnp->cn_cred, 0))) {
- free(cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, cnp->cn_pnbuf);
VOP_VFREE(tvp, ip->i_number, mode);
vput(tvp);
vput(dvp);
@@ -2141,7 +2141,7 @@ ufs_makeinode(mode, dvp, vpp, cnp)
goto bad;
if ((cnp->cn_flags & SAVESTART) == 0)
- FREE(cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, cnp->cn_pnbuf);
vput(dvp);
*vpp = tvp;
return (0);
@@ -2151,7 +2151,7 @@ bad:
* Write error occurred trying to update the inode
* or the directory so must deallocate the inode.
*/
- free(cnp->cn_pnbuf, M_NAMEI);
+ zfree(namei_zone, cnp->cn_pnbuf);
vput(dvp);
ip->i_nlink = 0;
ip->i_flag |= IN_CHANGE;
OpenPOWER on IntegriCloud