Source-Changes-HG archive

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

[src/trunk]: src/sys/kern PR kern/55146 (100+ file system test cases failing)



details:   https://anonhg.NetBSD.org/src/rev/6cf68645dc0f
branches:  trunk
changeset: 1008984:6cf68645dc0f
user:      ad <ad%NetBSD.org@localhost>
date:      Tue Apr 07 18:28:31 2020 +0000

description:
PR kern/55146 (100+ file system test cases failing)

- namei_oneroot(): key on negative return from lookup_fastforward()
  (EOPNOTSUPP), not positive.

- lookup_crossmount(): don't lose track of founddir.

>From hannken@, with a couple of tweaks.

diffstat:

 sys/kern/vfs_lookup.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (70 lines):

diff -r f8df6d489725 -r 6cf68645dc0f sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c     Tue Apr 07 17:57:33 2020 +0000
+++ b/sys/kern/vfs_lookup.c     Tue Apr 07 18:28:31 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_lookup.c,v 1.215 2020/04/04 20:49:30 ad Exp $      */
+/*     $NetBSD: vfs_lookup.c,v 1.216 2020/04/07 18:28:31 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.215 2020/04/04 20:49:30 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.216 2020/04/07 18:28:31 ad Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_magiclinks.h"
@@ -961,7 +961,7 @@
                error = vn_lock(foundobj, LK_SHARED);
                if (error != 0) {
                        vrele(foundobj);
-                       *foundobj_ret = NULL;
+                       foundobj = NULL;
                        break;
                }
 
@@ -975,7 +975,7 @@
                error = vfs_busy(mp);
                vput(foundobj);
                if (error != 0) {
-                       *foundobj_ret = NULL;
+                       foundobj = NULL;
                        break;
                }
 
@@ -983,7 +983,7 @@
                error = VFS_ROOT(mp, LK_NONE, &foundobj);
                vfs_unbusy(mp);
                if (error) {
-                       *foundobj_ret = NULL;
+                       foundobj = NULL;
                        break;
                }
 
@@ -1005,7 +1005,6 @@
                } else if (foundobj->v_type == VDIR) {
                        vrele(searchdir);
                        *searchdir_ret = searchdir = NULL;
-                       *foundobj_ret = foundobj;
                        lktype = LK_NONE;
                }
        }
@@ -1015,6 +1014,7 @@
                vn_lock(searchdir, lktype | LK_RETRY);
                *searchdir_locked = true;
        }
+       *foundobj_ret = foundobj;
        return error;
 }
 
@@ -1472,7 +1472,7 @@
                 * If we didn't get a good answer from the namecache, then
                 * go directly to the file system.
                 */
-               if (error != 0 && error != ENOENT) {
+               if (error == EOPNOTSUPP) {
                        error = lookup_once(state, searchdir, &searchdir,
                            &foundobj, &searchdir_locked);
                }



Home | Main Index | Thread Index | Old Index