diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-12 18:44:44 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-12 18:44:44 +0000 |
commit | 48b6cac396e42c57b5037f5a67d6cd7afb1733d6 (patch) | |
tree | 29d721c60c102e5fb6ed78e8ad45bbda321c951f /sys/nfs | |
parent | a29a93ecbd0d69878182d5959b330ae5badcadc7 (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/nfs')
-rw-r--r-- | sys/nfs/nfs_aiod.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_kq.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_node.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_serv.c | 22 | ||||
-rw-r--r-- | sys/nfs/nfs_srvcache.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_syscalls.c | 8 | ||||
-rw-r--r-- | sys/nfs/nfs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/nfs/nfs_vnops.c | 6 |
8 files changed, 29 insertions, 29 deletions
diff --git a/sys/nfs/nfs_aiod.c b/sys/nfs/nfs_aiod.c index ada3669560e..0f002b666e9 100644 --- a/sys/nfs/nfs_aiod.c +++ b/sys/nfs/nfs_aiod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_aiod.c,v 1.5 2013/11/03 13:50:24 miod Exp $ */ +/* $OpenBSD: nfs_aiod.c,v 1.6 2014/07/12 18:43:52 tedu Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -147,7 +147,7 @@ loop: /* Loop around until SIGKILL */ goto loop; out1: - free(aiod, M_TEMP); + free(aiod, M_TEMP, 0); nfs_numaiods--; KASSERT(nfs_numaiods >= 0); /* Rejust the limit of bufs to queue. See comment above. */ diff --git a/sys/nfs/nfs_kq.c b/sys/nfs/nfs_kq.c index e42dae30f25..aac0be74626 100644 --- a/sys/nfs/nfs_kq.c +++ b/sys/nfs/nfs_kq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_kq.c,v 1.19 2014/07/08 17:19:26 deraadt Exp $ */ +/* $OpenBSD: nfs_kq.c,v 1.20 2014/07/12 18:43:52 tedu Exp $ */ /* $NetBSD: nfs_kq.c,v 1.7 2003/10/30 01:43:10 simonb Exp $ */ /*- @@ -203,7 +203,7 @@ filt_nfsdetach(struct knote *kn) } else { /* last user, g/c */ SLIST_REMOVE(&kevlist, ke, kevq, kev_link); - free(ke, M_KEVENT); + free(ke, M_KEVENT, 0); } break; } diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index 9c7efe60679..7f86e51fac8 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_node.c,v 1.55 2010/12/21 20:14:43 thib Exp $ */ +/* $OpenBSD: nfs_node.c,v 1.56 2014/07/12 18:43:52 tedu Exp $ */ /* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */ /* @@ -199,7 +199,7 @@ nfs_inactive(void *v) nfs_removeit(sp); crfree(sp->s_cred); vrele(sp->s_dvp); - free(sp, M_NFSREQ); + free(sp, M_NFSREQ, 0); } np->n_flag &= (NMODIFIED | NFLUSHINPROG | NFLUSHWANT); diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index 84b8201d03e..3704086d4ee 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_serv.c,v 1.96 2014/07/08 17:19:26 deraadt Exp $ */ +/* $OpenBSD: nfs_serv.c,v 1.97 2014/07/12 18:43:52 tedu Exp $ */ /* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */ /* @@ -633,7 +633,7 @@ nfsrv_read(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, uiop->uio_segflg = UIO_SYSSPACE; error = VOP_READ(vp, uiop, IO_NODELOCKED, cred); off = uiop->uio_offset; - free(iv2, M_TEMP); + free(iv2, M_TEMP, 0); if (error || (getret = VOP_GETATTR(vp, &va, cred, procp)) != 0){ if (!error) error = getret; @@ -798,7 +798,7 @@ nfsrv_write(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, uiop->uio_offset = off; error = VOP_WRITE(vp, uiop, ioflags, cred); nfsstats.srvvop_writes++; - free(iv, M_TEMP); + free(iv, M_TEMP, 0); } aftat_ret = VOP_GETATTR(vp, &va, cred, procp); vput(vp); @@ -1727,7 +1727,7 @@ nfsrv_symlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp, } out: if (pathcp) - free(pathcp, M_TEMP); + free(pathcp, M_TEMP, 0); if (dirp) { diraft_ret = VOP_GETATTR(dirp, &diraft, cred, procp); vrele(dirp); @@ -1758,7 +1758,7 @@ nfsmout: if (nd.ni_vp) vrele(nd.ni_vp); if (pathcp) - free(pathcp, M_TEMP); + free(pathcp, M_TEMP, 0); return (error); } @@ -2102,7 +2102,7 @@ again: VOP_UNLOCK(vp, 0, procp); if (error) { vrele(vp); - free((caddr_t)rbuf, M_TEMP); + free((caddr_t)rbuf, M_TEMP, 0); nfsm_reply(NFSX_POSTOPATTR(info.nmi_v3)); nfsm_srvpostop_attr(nfsd, getret, &at, &info); error = 0; @@ -2128,7 +2128,7 @@ again: tl = nfsm_build(&info.nmi_mb, 2 * NFSX_UNSIGNED); *tl++ = nfs_false; *tl = nfs_true; - free(rbuf, M_TEMP); + free(rbuf, M_TEMP, 0); error = 0; goto nfsmout; } @@ -2206,7 +2206,7 @@ again: *tl = nfs_true; else *tl = nfs_false; - free(rbuf, M_TEMP); + free(rbuf, M_TEMP, 0); nfsmout: return(error); } @@ -2301,7 +2301,7 @@ again: error = getret; if (error) { vrele(vp); - free((caddr_t)rbuf, M_TEMP); + free((caddr_t)rbuf, M_TEMP, 0); nfsm_reply(NFSX_V3POSTOPATTR); nfsm_srvpostop_attr(nfsd, getret, &at, &info); error = 0; @@ -2324,7 +2324,7 @@ again: tl += 2; *tl++ = nfs_false; *tl = nfs_true; - free(rbuf, M_TEMP); + free(rbuf, M_TEMP, 0); error = 0; goto nfsmout; } @@ -2448,7 +2448,7 @@ invalid: *tl = nfs_true; else *tl = nfs_false; - free(rbuf, M_TEMP); + free(rbuf, M_TEMP, 0); nfsmout: return(error); } diff --git a/sys/nfs/nfs_srvcache.c b/sys/nfs/nfs_srvcache.c index c8d336b2479..ebda87e6479 100644 --- a/sys/nfs/nfs_srvcache.c +++ b/sys/nfs/nfs_srvcache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_srvcache.c,v 1.23 2009/06/04 18:36:43 thib Exp $ */ +/* $OpenBSD: nfs_srvcache.c,v 1.24 2014/07/12 18:43:52 tedu Exp $ */ /* $NetBSD: nfs_srvcache.c,v 1.12 1996/02/18 11:53:49 fvdl Exp $ */ /* @@ -262,7 +262,7 @@ nfsrv_cleancache(void) LIST_REMOVE(rp, rc_hash); TAILQ_REMOVE(&nfsrvlruhead, rp, rc_lru); nfsrv_cleanentry(rp); - free(rp, M_NFSD); + free(rp, M_NFSD, 0); } numnfsrvcache = 0; } diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c index af87e03e058..84c3216f535 100644 --- a/sys/nfs/nfs_syscalls.c +++ b/sys/nfs/nfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_syscalls.c,v 1.96 2013/11/03 13:50:24 miod Exp $ */ +/* $OpenBSD: nfs_syscalls.c,v 1.97 2014/07/12 18:43:52 tedu Exp $ */ /* $NetBSD: nfs_syscalls.c,v 1.19 1996/02/18 11:53:52 fvdl Exp $ */ /* @@ -456,7 +456,7 @@ loop: done: TAILQ_REMOVE(&nfsd_head, nfsd, nfsd_chain); splx(s); - free((caddr_t)nfsd, M_NFSD); + free((caddr_t)nfsd, M_NFSD, 0); if (--nfs_numnfsd == 0) nfsrv_init(1); /* Reinitialize everything */ return (error); @@ -506,7 +506,7 @@ nfsrv_slpderef(struct nfssvc_sock *slp) { if (--(slp->ns_sref) == 0 && (slp->ns_flag & SLP_VALID) == 0) { TAILQ_REMOVE(&nfssvc_sockhead, slp, ns_chain); - free((caddr_t)slp, M_NFSSVC); + free((caddr_t)slp, M_NFSSVC, 0); } } @@ -530,7 +530,7 @@ nfsrv_init(int terminating) if (slp->ns_flag & SLP_VALID) nfsrv_zapsock(slp); TAILQ_REMOVE(&nfssvc_sockhead, slp, ns_chain); - free((caddr_t)slp, M_NFSSVC); + free((caddr_t)slp, M_NFSSVC, 0); } nfsrv_cleancache(); /* And clear out server cache */ } diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index a9d441a552f..f955f17a60c 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vfsops.c,v 1.99 2013/12/01 16:40:56 krw Exp $ */ +/* $OpenBSD: nfs_vfsops.c,v 1.100 2014/07/12 18:43:52 tedu Exp $ */ /* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */ /* @@ -678,7 +678,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct mbuf *nam, return (0); bad: nfs_disconnect(nmp); - free((caddr_t)nmp, M_NFSMNT); + free((caddr_t)nmp, M_NFSMNT, 0); m_freem(nam); return (error); } @@ -703,7 +703,7 @@ nfs_unmount(struct mount *mp, int mntflags, struct proc *p) nfs_disconnect(nmp); m_freem(nmp->nm_nam); timeout_del(&nmp->nm_rtimeout); - free(nmp, M_NFSMNT); + free(nmp, M_NFSMNT, 0); return (0); } diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index fc708ae0f2c..35593451ccf 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.151 2014/07/08 17:19:26 deraadt Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.152 2014/07/12 18:43:52 tedu Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -2040,7 +2040,7 @@ nfs_readdir(void *v) } } while (!error && !done && !eof && cnt--); - free(data, M_TEMP); + free(data, M_TEMP, 0); data = NULL; uio->uio_offset = newoff; @@ -2538,7 +2538,7 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) bad: vrele(sp->s_dvp); crfree(sp->s_cred); - free(sp, M_NFSREQ); + free(sp, M_NFSREQ, 0); return (error); } |