Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/lib/libumem Add missing part of kmem_cac...
details: https://anonhg.NetBSD.org/src/rev/7ad25db15217
branches: trunk
changeset: 999245:7ad25db15217
user: hannken <hannken%NetBSD.org@localhost>
date: Sun May 26 10:21:00 2019 +0000
description:
Add missing part of kmem_cache cleanup. Use Solaris argument order for
kmem_cache destructors, umem_cache_alloc() and umem_cache_free() too.
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/arc.c | 9 ---------
external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c | 3 ---
external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c | 3 ---
external/cddl/osnet/dist/uts/common/fs/zfs/sa.c | 3 ---
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c | 3 ---
external/cddl/osnet/lib/libumem/umem.c | 8 +++-----
6 files changed, 3 insertions(+), 26 deletions(-)
diffs (114 lines):
diff -r 8500bf1d1520 -r 7ad25db15217 external/cddl/osnet/dist/uts/common/fs/zfs/arc.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c Sun May 26 09:54:32 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c Sun May 26 10:21:00 2019 +0000
@@ -1623,9 +1623,6 @@
{
arc_buf_hdr_t *hdr = vbuf;
-#ifdef __NetBSD__
- hdr = unused;
-#endif
ASSERT(HDR_EMPTY(hdr));
cv_destroy(&hdr->b_l1hdr.b_cv);
refcount_destroy(&hdr->b_l1hdr.b_refcnt);
@@ -1640,9 +1637,6 @@
{
arc_buf_hdr_t *hdr = vbuf;
-#ifdef __NetBSD__
- hdr = unused;
-#endif
ASSERT(HDR_EMPTY(hdr));
arc_space_return(HDR_L2ONLY_SIZE, ARC_SPACE_L2HDRS);
}
@@ -1653,9 +1647,6 @@
{
arc_buf_t *buf = vbuf;
-#ifdef __NetBSD__
- buf = unused;
-#endif
mutex_destroy(&buf->b_evict_lock);
arc_space_return(sizeof (arc_buf_t), ARC_SPACE_HDRS);
}
diff -r 8500bf1d1520 -r 7ad25db15217 external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c Sun May 26 09:54:32 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/dbuf.c Sun May 26 10:21:00 2019 +0000
@@ -153,9 +153,6 @@
{
dmu_buf_impl_t *db = vdb;
-#ifdef __NetBSD__
- db = unused;
-#endif
mutex_destroy(&db->db_mtx);
cv_destroy(&db->db_changed);
ASSERT(!multilist_link_active(&db->db_cache_link));
diff -r 8500bf1d1520 -r 7ad25db15217 external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c Sun May 26 09:54:32 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c Sun May 26 10:21:00 2019 +0000
@@ -168,9 +168,6 @@
int i;
dnode_t *dn = arg;
-#ifdef __NetBSD__
- dn = unused;
-#endif
rw_destroy(&dn->dn_struct_rwlock);
mutex_destroy(&dn->dn_mtx);
mutex_destroy(&dn->dn_dbufs_mtx);
diff -r 8500bf1d1520 -r 7ad25db15217 external/cddl/osnet/dist/uts/common/fs/zfs/sa.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/sa.c Sun May 26 09:54:32 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/sa.c Sun May 26 10:21:00 2019 +0000
@@ -222,9 +222,6 @@
{
sa_handle_t *hdl = buf;
-#ifdef __NetBSD__
- hdl = unused;
-#endif
mutex_destroy(&hdl->sa_lock);
}
diff -r 8500bf1d1520 -r 7ad25db15217 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Sun May 26 09:54:32 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Sun May 26 10:21:00 2019 +0000
@@ -152,9 +152,6 @@
{
znode_t *zp = buf;
-#ifdef __NetBSD__
- zp = arg;
-#endif
ASSERT(!POINTER_IS_VALID(zp->z_zfsvfs));
ASSERT(ZTOV(zp) == NULL);
#ifndef __NetBSD__
diff -r 8500bf1d1520 -r 7ad25db15217 external/cddl/osnet/lib/libumem/umem.c
--- a/external/cddl/osnet/lib/libumem/umem.c Sun May 26 09:54:32 2019 +0000
+++ b/external/cddl/osnet/lib/libumem/umem.c Sun May 26 10:21:00 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: umem.c,v 1.2 2010/05/02 23:59:54 haad Exp $ */
+/* $NetBSD: umem.c,v 1.3 2019/05/26 10:21:00 hannken Exp $ */
/*
* CDDL HEADER START
@@ -135,8 +135,7 @@
}
if(cache->constructor != NULL) {
- /* XXX NetBSD pool cache costructor has switched arguments. */
- if(cache->constructor(cache->callback_data, buf, flags) != 0) {
+ if(cache->constructor(buf, cache->callback_data, flags) != 0) {
free(buf);
if(!(flags & UMEM_NOFAIL))
return NULL;
@@ -156,8 +155,7 @@
void umem_cache_free(umem_cache_t *cache, void *buffer)
{
if(cache->destructor != NULL)
- /* XXX NetBSD pool cache costructor has switched arguments. */
- cache->destructor(cache->callback_data, buffer);
+ cache->destructor(buffer, cache->callback_data);
free(buffer);
}
Home |
Main Index |
Thread Index |
Old Index