Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Fix merge error - adjust assertions.



details:   https://anonhg.NetBSD.org/src/rev/83580a9f2eb4
branches:  trunk
changeset: 1010620:83580a9f2eb4
user:      ad <ad%NetBSD.org@localhost>
date:      Sat May 30 20:23:25 2020 +0000

description:
Fix merge error - adjust assertions.

diffstat:

 sys/kern/vfs_lookup.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r 2c3dc76a1c28 -r 83580a9f2eb4 sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c     Sat May 30 20:16:34 2020 +0000
+++ b/sys/kern/vfs_lookup.c     Sat May 30 20:23:25 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_lookup.c,v 1.221 2020/05/30 20:16:14 ad Exp $      */
+/*     $NetBSD: vfs_lookup.c,v 1.222 2020/05/30 20:23:25 ad Exp $      */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.221 2020/05/30 20:16:14 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.222 2020/05/30 20:23:25 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_magiclinks.h"
@@ -935,10 +935,10 @@
        error = 0;
 
        KASSERT((cnp->cn_flags & NOCROSSMOUNT) == 0);
-       KASSERT(searchdir != NULL);
 
        /* First, unlock searchdir (oof). */
        if (*searchdir_locked) {
+               KASSERT(searchdir != NULL);
                lktype = VOP_ISLOCKED(searchdir);
                VOP_UNLOCK(searchdir);
                *searchdir_locked = false;
@@ -1608,7 +1608,8 @@
                         * foundobj == NULL.
                         */
                        /* lookup_once can't have dropped the searchdir */
-                       KASSERT(searchdir != NULL);
+                       KASSERT(searchdir != NULL ||
+                           (cnp->cn_flags & ISLASTCN) != 0);
                        break;
                }
 



Home | Main Index | Thread Index | Old Index