Module Name: src Committed By: hannken Date: Sat Nov 13 14:52:08 UTC 2021
Modified Files: src/sys/kern: vfs_lookup.c Log Message: If lookup_fastforward() loses an intermediate searchdir, has to roll back and retry it must use the initial searchdir from *searchdir_ret for lookup_parsepath(). To generate a diff of this commit: cvs rdiff -u -r1.229 -r1.230 src/sys/kern/vfs_lookup.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_lookup.c diff -u src/sys/kern/vfs_lookup.c:1.229 src/sys/kern/vfs_lookup.c:1.230 --- src/sys/kern/vfs_lookup.c:1.229 Tue Jun 29 22:39:21 2021 +++ src/sys/kern/vfs_lookup.c Sat Nov 13 14:52:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_lookup.c,v 1.229 2021/06/29 22:39:21 dholland Exp $ */ +/* $NetBSD: vfs_lookup.c,v 1.230 2021/11/13 14:52:08 hannken Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.229 2021/06/29 22:39:21 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.230 2021/11/13 14:52:08 hannken Exp $"); #ifdef _KERNEL_OPT #include "opt_magiclinks.h" @@ -1474,13 +1474,9 @@ lookup_fastforward(struct namei_state *s } cnp->cn_nameptr = oldnameptr; ndp->ni_pathlen = oldpathlen; - if (searchdir == NULL) { + error = lookup_parsepath(state, *searchdir_ret); + if (error == 0) { error = EOPNOTSUPP; - } else { - error = lookup_parsepath(state, searchdir); - if (error == 0) { - error = EOPNOTSUPP; - } } } } else if (plock != NULL) {