diff options
author | andre <andre@FreeBSD.org> | 2013-08-24 16:57:44 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2013-08-24 16:57:44 +0000 |
commit | b148bf45e00854fc92a79e2434843fc0ced325ba (patch) | |
tree | d9cb73f9fc061a57daf8eba0e946e359dfddf04c /sys/kern/uipc_syscalls.c | |
parent | b7d376ce03e400fd642a642d69997ab017a9466e (diff) | |
download | FreeBSD-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_syscalls.c')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 4576440..7c19bc6 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1855,7 +1855,7 @@ struct sendfile_sync { * Detach mapped page and release resources back to the system. */ void -sf_buf_mext(void *addr, void *args) +sf_buf_mext(struct mbuf *mb, void *addr, void *args) { vm_page_t m; struct sendfile_sync *sfs; @@ -2315,14 +2315,14 @@ retry_space: m0 = m_get((mnw ? M_NOWAIT : M_WAITOK), MT_DATA); if (m0 == NULL) { error = (mnw ? EAGAIN : ENOBUFS); - sf_buf_mext(NULL, sf); + sf_buf_mext(NULL, NULL, sf); break; } if (m_extadd(m0, (caddr_t )sf_buf_kva(sf), PAGE_SIZE, sf_buf_mext, sfs, sf, M_RDONLY, EXT_SFBUF, (mnw ? M_NOWAIT : M_WAITOK)) != 0) { error = (mnw ? EAGAIN : ENOBUFS); - sf_buf_mext(NULL, sf); + sf_buf_mext(NULL, NULL, sf); m_freem(m0); break; } |