Module Name:    src
Committed By:   ad
Date:           Mon Mar 23 18:56:15 UTC 2020

Modified Files:
        src/sys/kern: vfs_cache.c

Log Message:
Correct an assertion.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/kern/vfs_cache.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/vfs_cache.c
diff -u src/sys/kern/vfs_cache.c:1.131 src/sys/kern/vfs_cache.c:1.132
--- src/sys/kern/vfs_cache.c:1.131	Mon Mar 23 18:41:40 2020
+++ src/sys/kern/vfs_cache.c	Mon Mar 23 18:56:14 2020
@@ -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 @@ cache_remove(struct namecache *ncp, cons
 
 	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 @@ cache_lookup_raw(struct vnode *dvp, cons
  * 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 @@ cache_lookup_linked(struct vnode *dvp, c
 	*vn_ret = ncp->nc_vp;
 	return true;
 }
-#endif /* notyet */
 
 /*
  * Scan cache looking for name of directory entry pointing at vp.
@@ -959,7 +957,6 @@ cache_enter_id(struct vnode *vp, mode_t 
  * 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 @@ cache_have_id(struct vnode *vp)
 		return false;
 	}
 }
-#endif /* notyet */
 
 /*
  * Name cache initialization, from vfs_init() when the system is booting.

Reply via email to