Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Correct an assertion.



details:   https://anonhg.NetBSD.org/src/rev/d45720ac6b37
branches:  trunk
changeset: 746185:d45720ac6b37
user:      ad <ad%NetBSD.org@localhost>
date:      Mon Mar 23 18:56:14 2020 +0000

description:
Correct an assertion.

diffstat:

 sys/kern/vfs_cache.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (59 lines):

diff -r d089ab409d5e -r d45720ac6b37 sys/kern/vfs_cache.c
--- a/sys/kern/vfs_cache.c      Mon Mar 23 18:44:17 2020 +0000
+++ b/sys/kern/vfs_cache.c      Mon Mar 23 18:56:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_cache.c,v 1.131 2020/03/23 18:41:40 ad Exp $       */
+/*     $NetBSD: vfs_cache.c,v 1.132 2020/03/23 18:56:14 ad Exp $       */
 
 /*-
  * Copyright (c) 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -172,7 +172,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.131 2020/03/23 18:41:40 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_cache.c,v 1.132 2020/03/23 18:56:14 ad Exp $");
 
 #define __NAMECACHE_PRIVATE
 #ifdef _KERNEL_OPT
@@ -352,7 +352,7 @@
 
        KASSERT(rw_write_held(&dvi->vi_nc_lock));
        KASSERT(cache_key(ncp->nc_name, ncp->nc_nlen) == ncp->nc_key);
-       KASSERT(rb_tree_find_node(&dvi->vi_nc_tree, &ncp->nc_key) == ncp);
+       KASSERT(rb_tree_find_node(&dvi->vi_nc_tree, ncp) == ncp);
 
        SDT_PROBE(vfs, namecache, invalidate, done, ncp,
            0, 0, 0, 0);
@@ -621,7 +621,6 @@
  * names in the cache.  The node locks are chained along the way: a parent's
  * lock is not dropped until the child's is acquired.
  */
-#ifdef notyet
 bool
 cache_lookup_linked(struct vnode *dvp, const char *name, size_t namelen,
                    struct vnode **vn_ret, krwlock_t **plock,
@@ -718,7 +717,6 @@
        *vn_ret = ncp->nc_vp;
        return true;
 }
-#endif /* notyet */
 
 /*
  * Scan cache looking for name of directory entry pointing at vp.
@@ -959,7 +957,6 @@
  * information, missing some updates, so always check the mount flag
  * instead of looking for !VNOVAL.
  */
-#ifdef notyet
 bool
 cache_have_id(struct vnode *vp)
 {
@@ -974,7 +971,6 @@
                return false;
        }
 }
-#endif /* notyet */
 
 /*
  * Name cache initialization, from vfs_init() when the system is booting.



Home | Main Index | Thread Index | Old Index