Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Move unrelated error handling logic out of namei_pa...
details: https://anonhg.NetBSD.org/src/rev/472734f4641f
branches: trunk
changeset: 764056:472734f4641f
user: dholland <dholland%NetBSD.org@localhost>
date: Mon Apr 11 01:39:13 2011 +0000
description:
Move unrelated error handling logic out of namei_parsepath.
diffstat:
sys/kern/vfs_lookup.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r c974753922c0 -r 472734f4641f sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c Mon Apr 11 01:38:47 2011 +0000
+++ b/sys/kern/vfs_lookup.c Mon Apr 11 01:39:13 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_lookup.c,v 1.142 2011/04/11 01:38:47 dholland Exp $ */
+/* $NetBSD: vfs_lookup.c,v 1.143 2011/04/11 01:39:13 dholland Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.142 2011/04/11 01:38:47 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.143 2011/04/11 01:39:13 dholland Exp $");
#include "opt_magiclinks.h"
@@ -805,8 +805,6 @@
cnp->cn_hash = namei_hash(cnp->cn_nameptr, &cp);
cnp->cn_namelen = cp - cnp->cn_nameptr;
if (cnp->cn_namelen > NAME_MAX) {
- vput(state->dp);
- ndp->ni_dvp = NULL;
return ENAMETOOLONG;
}
#ifdef NAMEI_DIAGNOSTIC
@@ -1127,6 +1125,8 @@
error = lookup_parsepath(state);
if (error) {
+ vput(state->dp);
+ ndp->ni_dvp = NULL;
ndp->ni_vp = NULL;
/* XXX this should use namei_end() */
if (ndp->ni_dvp) {
Home |
Main Index |
Thread Index |
Old Index