summaryrefslogtreecommitdiff
path: root/sys/ntfs
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-07-12 18:44:44 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-07-12 18:44:44 +0000
commit48b6cac396e42c57b5037f5a67d6cd7afb1733d6 (patch)
tree29d721c60c102e5fb6ed78e8ad45bbda321c951f /sys/ntfs
parenta29a93ecbd0d69878182d5959b330ae5badcadc7 (diff)
add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.
Diffstat (limited to 'sys/ntfs')
-rw-r--r--sys/ntfs/ntfs_ihash.c4
-rw-r--r--sys/ntfs/ntfs_subr.c42
-rw-r--r--sys/ntfs/ntfs_vfsops.c12
-rw-r--r--sys/ntfs/ntfs_vnops.c4
4 files changed, 31 insertions, 31 deletions
diff --git a/sys/ntfs/ntfs_ihash.c b/sys/ntfs/ntfs_ihash.c
index ecf3064087a..3c53d6a6501 100644
--- a/sys/ntfs/ntfs_ihash.c
+++ b/sys/ntfs/ntfs_ihash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_ihash.c,v 1.14 2014/01/19 18:35:45 tedu Exp $ */
+/* $OpenBSD: ntfs_ihash.c,v 1.15 2014/07/12 18:43:52 tedu Exp $ */
/* $NetBSD: ntfs_ihash.c,v 1.1 2002/12/23 17:38:32 jdolecek Exp $ */
/*
@@ -68,7 +68,7 @@ ntfs_nthashinit(void)
nthashtbl = hashinit(desiredvnodes, M_NTFSNTHASH, M_WAITOK, &nthash);
if (ntfs_nthashtbl) {
- free(nthashtbl, M_NTFSNTHASH);
+ free(nthashtbl, M_NTFSNTHASH, 0);
return;
}
ntfs_nthashtbl = nthashtbl;
diff --git a/sys/ntfs/ntfs_subr.c b/sys/ntfs/ntfs_subr.c
index 31bb58534cb..963ed7f4735 100644
--- a/sys/ntfs/ntfs_subr.c
+++ b/sys/ntfs/ntfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_subr.c,v 1.37 2014/01/19 18:35:45 tedu Exp $ */
+/* $OpenBSD: ntfs_subr.c,v 1.38 2014/07/12 18:43:52 tedu Exp $ */
/* $NetBSD: ntfs_subr.c,v 1.4 2003/04/10 21:37:32 jdolecek Exp $ */
/*-
@@ -241,7 +241,7 @@ ntfs_ntvattrget(struct ntfsmount *ntmp, struct ntnode *ip, u_int32_t type,
"name: %.*s, vcn: %llu\n", ip->i_number, type,
(unsigned int)namelen, name, vcn);
out:
- free(alpool, M_TEMP);
+ free(alpool, M_TEMP, 0);
return (error);
}
@@ -354,7 +354,7 @@ ntfs_loadntnode(struct ntfsmount *ntmp, struct ntnode *ip)
ntmp->ntm_ntnodes++;
out:
- free(mfrp, M_TEMP);
+ free(mfrp, M_TEMP, 0);
return (error);
}
@@ -476,7 +476,7 @@ ntfs_ntput(struct ntnode *ip, struct proc *p)
}
vrele(ip->i_devvp);
- free(ip, M_NTFSNTNODE);
+ free(ip, M_NTFSNTNODE, 0);
}
/*
@@ -515,14 +515,14 @@ ntfs_freentvattr(struct ntvattr *vap)
{
if (vap->va_flag & NTFS_AF_INRUN) {
if (vap->va_vruncn)
- free(vap->va_vruncn, M_NTFSRUN);
+ free(vap->va_vruncn, M_NTFSRUN, 0);
if (vap->va_vruncl)
- free(vap->va_vruncl, M_NTFSRUN);
+ free(vap->va_vruncl, M_NTFSRUN, 0);
} else {
if (vap->va_datap)
- free(vap->va_datap, M_NTFSRDATA);
+ free(vap->va_datap, M_NTFSRDATA, 0);
}
- free(vap, M_NTFSNTVATTR);
+ free(vap, M_NTFSNTVATTR, 0);
}
/*
@@ -582,7 +582,7 @@ ntfs_attrtontvattr(struct ntfsmount *ntmp, struct ntvattr **rvapp,
DDPRINTF(", len: %llu", vap->va_datalen);
if (error)
- free(vap, M_NTFSNTVATTR);
+ free(vap, M_NTFSNTVATTR, 0);
else
*rvapp = vap;
@@ -762,10 +762,10 @@ ntfs_frele(struct fnode *fp)
DPRINTF("ntfs_frele: deallocating fnode\n");
LIST_REMOVE(fp,f_fnlist);
if (fp->f_flag & FN_AATTRNAME)
- free(fp->f_attrname, M_TEMP);
+ free(fp->f_attrname, M_TEMP, 0);
if (fp->f_dirblbuf)
- free(fp->f_dirblbuf, M_NTFSDIR);
- free(fp, M_NTFSFNODE);
+ free(fp->f_dirblbuf, M_NTFSDIR, 0);
+ free(fp, M_NTFSFNODE, 0);
ntfs_ntrele(ip);
}
@@ -955,7 +955,7 @@ ntfs_ntlookupfile(struct ntfsmount *ntmp, struct vnode *vp,
/* free the buffer returned by ntfs_ntlookupattr() */
if (attrname) {
- free(attrname, M_TEMP);
+ free(attrname, M_TEMP, 0);
attrname = NULL;
}
@@ -1048,7 +1048,7 @@ ntfs_ntlookupfile(struct ntfsmount *ntmp, struct vnode *vp,
tctx = lookup_ctx;
lookup_ctx = lookup_ctx->prev;
- free(tctx, M_TEMP);
+ free(tctx, M_TEMP, 0);
} else {
DPRINTF("ntfs_ntlookupfile: nowhere to dive :-(\n");
error = ENOENT;
@@ -1072,14 +1072,14 @@ fail:
if (vap)
ntfs_ntvattrrele(vap);
if (rdbuf)
- free(rdbuf, M_TEMP);
+ free(rdbuf, M_TEMP, 0);
if (attrname)
- free(attrname, M_TEMP);
+ free(attrname, M_TEMP, 0);
if (lookup_ctx) {
while(lookup_ctx) {
tctx = lookup_ctx;
lookup_ctx = lookup_ctx->prev;
- free(tctx, M_TEMP);
+ free(tctx, M_TEMP, 0);
}
}
ntfs_ntput(ip, p);
@@ -1272,7 +1272,7 @@ fail:
if (iavap)
ntfs_ntvattrrele(iavap);
if (bmp)
- free(bmp, M_TEMP);
+ free(bmp, M_TEMP, 0);
ntfs_ntput(ip, p);
return (error);
@@ -1744,8 +1744,8 @@ ntfs_readattr(struct ntfsmount *ntmp, struct ntnode *ip, u_int32_t attrnum,
cn += NTFS_COMPUNIT_CL;
}
- free(uup, M_NTFSDECOMP);
- free(cup, M_NTFSDECOMP);
+ free(uup, M_NTFSDECOMP, 0);
+ free(cup, M_NTFSDECOMP, 0);
} else
error = ntfs_readattr_plain(ntmp, ip, attrnum, attrname,
roff, rsize, rdata, &init, uio);
@@ -1927,7 +1927,7 @@ ntfs_toupper_unuse(struct proc *p)
ntfs_toupper_usecount--;
if (ntfs_toupper_usecount == 0) {
- free(ntfs_toupper_tab, M_NTFSRDATA);
+ free(ntfs_toupper_tab, M_NTFSRDATA, 0);
ntfs_toupper_tab = NULL;
}
#ifdef DIAGNOSTIC
diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c
index e128580677f..11d2da2976c 100644
--- a/sys/ntfs/ntfs_vfsops.c
+++ b/sys/ntfs/ntfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_vfsops.c,v 1.39 2014/07/08 17:19:26 deraadt Exp $ */
+/* $OpenBSD: ntfs_vfsops.c,v 1.40 2014/07/12 18:43:52 tedu Exp $ */
/* $NetBSD: ntfs_vfsops.c,v 1.7 2003/04/24 07:50:19 christos Exp $ */
/*-
@@ -457,8 +457,8 @@ out:
if (ntmp != NULL) {
if (ntmp->ntm_ad != NULL)
- free(ntmp->ntm_ad, M_NTFSMNT);
- free(ntmp, M_NTFSMNT);
+ free(ntmp->ntm_ad, M_NTFSMNT, 0);
+ free(ntmp, M_NTFSMNT, 0);
mp->mnt_data = NULL;
}
@@ -536,8 +536,8 @@ ntfs_unmount(struct mount *mp, int mntflags, struct proc *p)
DPRINTF("ntfs_unmount: freeing memory...\n");
mp->mnt_data = NULL;
mp->mnt_flag &= ~MNT_LOCAL;
- free(ntmp->ntm_ad, M_NTFSMNT);
- free(ntmp, M_NTFSMNT);
+ free(ntmp->ntm_ad, M_NTFSMNT, 0);
+ free(ntmp, M_NTFSMNT, 0);
return (error);
}
@@ -595,7 +595,7 @@ ntfs_calccfree(struct ntfsmount *ntmp, cn_t *cfreep)
*cfreep = cfree;
out:
- free(tmp, M_TEMP);
+ free(tmp, M_TEMP, 0);
return(error);
}
diff --git a/sys/ntfs/ntfs_vnops.c b/sys/ntfs/ntfs_vnops.c
index 2da5a8043ae..b8277cfdb0a 100644
--- a/sys/ntfs/ntfs_vnops.c
+++ b/sys/ntfs/ntfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_vnops.c,v 1.35 2013/12/14 02:57:25 guenther Exp $ */
+/* $OpenBSD: ntfs_vnops.c,v 1.36 2014/07/12 18:43:52 tedu Exp $ */
/* $NetBSD: ntfs_vnops.c,v 1.6 2003/04/10 21:57:26 jdolecek Exp $ */
/*
@@ -576,7 +576,7 @@ ntfs_readdir(void *v)
*/
out:
if (fp->f_dirblbuf != NULL) {
- free(fp->f_dirblbuf, M_NTFSDIR);
+ free(fp->f_dirblbuf, M_NTFSDIR, 0);
fp->f_dirblbuf = NULL;
}
return (error);