Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/sys/sys Replace vp->v_count with vrefcnt...



details:   https://anonhg.NetBSD.org/src/rev/01d44dec408d
branches:  trunk
changeset: 933517:01d44dec408d
user:      hannken <hannken%NetBSD.org@localhost>
date:      Tue May 26 08:39:27 2020 +0000

description:
Replace vp->v_count with vrefcnt(vp) and
remove now unneeded "#define v_count ...".

diffstat:

 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c |  4 ++++
 external/cddl/osnet/sys/sys/vnode.h                     |  3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 395e98a207bf -r 01d44dec408d external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c   Tue May 26 07:23:57 2020 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c   Tue May 26 08:39:27 2020 +0000
@@ -2311,7 +2311,11 @@
        for (zp = list_head(&zfsvfs->z_all_znodes); zp != NULL;
            zp = list_next(&zfsvfs->z_all_znodes, zp))
                if (zp->z_sa_hdl) {
+#ifdef __NetBSD__
+                       ASSERT(vrefcnt(ZTOV(zp)) >= 0);
+#else
                        ASSERT(ZTOV(zp)->v_count >= 0);
+#endif
                        zfs_znode_dmu_fini(zp);
                }
        mutex_exit(&zfsvfs->z_znodes_lock);
diff -r 395e98a207bf -r 01d44dec408d external/cddl/osnet/sys/sys/vnode.h
--- a/external/cddl/osnet/sys/sys/vnode.h       Tue May 26 07:23:57 2020 +0000
+++ b/external/cddl/osnet/sys/sys/vnode.h       Tue May 26 08:39:27 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnode.h,v 1.16 2020/04/13 19:23:17 ad Exp $    */
+/*     $NetBSD: vnode.h,v 1.17 2020/05/26 08:39:27 hannken Exp $       */
 
 /*
  * CDDL HEADER START
@@ -135,7 +135,6 @@
 #define        vop_fid_args    vop_vptofh_args
 #define        a_fid           a_fhp
 
-#define        v_count         v_usecount
 #define        v_object        v_uobj
 
 struct vop_vptofh_args {



Home | Main Index | Thread Index | Old Index