summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_mbuf.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2013-08-24 16:57:44 +0000
committerandre <andre@FreeBSD.org>2013-08-24 16:57:44 +0000
commitb148bf45e00854fc92a79e2434843fc0ced325ba (patch)
treed9cb73f9fc061a57daf8eba0e946e359dfddf04c /sys/kern/uipc_mbuf.c
parentb7d376ce03e400fd642a642d69997ab017a9466e (diff)
downloadFreeBSD-src-b148bf45e00854fc92a79e2434843fc0ced325ba.zip
FreeBSD-src-b148bf45e00854fc92a79e2434843fc0ced325ba.tar.gz
Add an mbuf pointer parameter to (*ext_free) to give the external
free function access to the mbuf the external memory was attached to. Mechanically adjust all users to include the mbuf parameter. This fixes a long standing annoyance for external free functions. Before one had to sacrifice one of the argument pointers for this. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r--sys/kern/uipc_mbuf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index f02e8ce..4b356b7 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -247,8 +247,8 @@ m_freem(struct mbuf *mb)
*/
int
m_extadd(struct mbuf *mb, caddr_t buf, u_int size,
- void (*freef)(void *, void *), void *arg1, void *arg2, int flags, int type,
- int wait)
+ void (*freef)(struct mbuf *, void *, void *), void *arg1, void *arg2,
+ int flags, int type, int wait)
{
KASSERT(type != EXT_CLUSTER, ("%s: EXT_CLUSTER not allowed", __func__));
@@ -321,7 +321,7 @@ mb_free_ext(struct mbuf *m)
case EXT_EXTREF:
KASSERT(m->m_ext.ext_free != NULL,
("%s: ext_free not set", __func__));
- (*(m->m_ext.ext_free))(m->m_ext.ext_arg1,
+ (*(m->m_ext.ext_free))(m, m->m_ext.ext_arg1,
m->m_ext.ext_arg2);
break;
default:
OpenPOWER on IntegriCloud