Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Cull unused INRENAME and INRELOOKUP from callers.
details: https://anonhg.NetBSD.org/src/rev/13eeb9ccd6dc
branches: trunk
changeset: 337600:13eeb9ccd6dc
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Apr 21 03:19:03 2015 +0000
description:
Cull unused INRENAME and INRELOOKUP from callers.
diffstat:
sys/kern/vfs_lookup.c | 8 +++-----
sys/kern/vfs_syscalls.c | 8 ++++----
sys/nfs/nfs_serv.c | 8 ++++----
sys/rump/include/rump/rump_namei.h | 8 +++-----
sys/sys/namei.h | 12 ++++--------
5 files changed, 18 insertions(+), 26 deletions(-)
diffs (176 lines):
diff -r 130a15be780b -r 13eeb9ccd6dc sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c Tue Apr 21 03:18:21 2015 +0000
+++ b/sys/kern/vfs_lookup.c Tue Apr 21 03:19:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_lookup.c,v 1.201 2014/02/07 15:29:22 hannken Exp $ */
+/* $NetBSD: vfs_lookup.c,v 1.202 2015/04/21 03:19:03 riastradh Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.201 2014/02/07 15:29:22 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.202 2015/04/21 03:19:03 riastradh Exp $");
#include "opt_magiclinks.h"
@@ -482,9 +482,9 @@
static void
namei_init(struct namei_state *state, struct nameidata *ndp)
{
+
state->ndp = ndp;
state->cnp = &ndp->ni_cnd;
- KASSERT((state->cnp->cn_flags & INRELOOKUP) == 0);
state->docache = 0;
state->rdonly = 0;
@@ -1736,9 +1736,7 @@
* We now have a segment name to search for, and a directory to search.
*/
*vpp = NULL;
- cnp->cn_flags |= INRELOOKUP;
error = VOP_LOOKUP(dvp, vpp, cnp);
- cnp->cn_flags &= ~INRELOOKUP;
if ((error) != 0) {
#ifdef DIAGNOSTIC
if (*vpp != NULL)
diff -r 130a15be780b -r 13eeb9ccd6dc sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c Tue Apr 21 03:18:21 2015 +0000
+++ b/sys/kern/vfs_syscalls.c Tue Apr 21 03:19:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_syscalls.c,v 1.496 2015/04/20 23:03:08 riastradh Exp $ */
+/* $NetBSD: vfs_syscalls.c,v 1.497 2015/04/21 03:19:03 riastradh Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.496 2015/04/20 23:03:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.497 2015/04/21 03:19:03 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_fileassoc.h"
@@ -4198,7 +4198,7 @@
* locked yet, but (a) namei is insane, and (b) VOP_RENAME is
* insane, so for the time being we need to leave it like this.
*/
- NDINIT(&fnd, DELETE, (LOCKPARENT | TRYEMULROOT | INRENAME), fpb);
+ NDINIT(&fnd, DELETE, (LOCKPARENT | TRYEMULROOT), fpb);
if ((error = fd_nameiat(l, fromfd, &fnd)) != 0)
goto out2;
@@ -4251,7 +4251,7 @@
* XXX Why not pass CREATEDIR always?
*/
NDINIT(&tnd, RENAME,
- (LOCKPARENT | NOCACHE | TRYEMULROOT | INRENAME |
+ (LOCKPARENT | NOCACHE | TRYEMULROOT |
((fvp->v_type == VDIR)? CREATEDIR : 0)),
tpb);
if ((error = fd_nameiat(l, tofd, &tnd)) != 0)
diff -r 130a15be780b -r 13eeb9ccd6dc sys/nfs/nfs_serv.c
--- a/sys/nfs/nfs_serv.c Tue Apr 21 03:18:21 2015 +0000
+++ b/sys/nfs/nfs_serv.c Tue Apr 21 03:19:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_serv.c,v 1.171 2015/04/20 23:03:09 riastradh Exp $ */
+/* $NetBSD: nfs_serv.c,v 1.172 2015/04/21 03:19:03 riastradh Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.171 2015/04/20 23:03:09 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.172 2015/04/21 03:19:03 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1930,7 +1930,7 @@
saved_uid = kauth_cred_geteuid(cred);
fromnd.ni_cnd.cn_cred = cred;
fromnd.ni_cnd.cn_nameiop = DELETE;
- fromnd.ni_cnd.cn_flags = LOCKPARENT | INRENAME;
+ fromnd.ni_cnd.cn_flags = LOCKPARENT;
error = nfs_namei(&fromnd, &fnsfh, len, slp, nam, &md,
&dpos, &fdirp, lwp, (nfsd->nd_flag & ND_KERBAUTH), false);
if (error == 0 && fdirp && v3) {
@@ -2006,7 +2006,7 @@
kauth_cred_seteuid(cred, saved_uid);
tond.ni_cnd.cn_cred = cred;
tond.ni_cnd.cn_nameiop = RENAME;
- tond.ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF | NOCACHE | INRENAME;
+ tond.ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF | NOCACHE;
error = nfs_namei(&tond, &tnsfh, len2, slp, nam, &md,
&dpos, &tdirp, lwp, (nfsd->nd_flag & ND_KERBAUTH), false);
if (tdirp && v3) {
diff -r 130a15be780b -r 13eeb9ccd6dc sys/rump/include/rump/rump_namei.h
--- a/sys/rump/include/rump/rump_namei.h Tue Apr 21 03:18:21 2015 +0000
+++ b/sys/rump/include/rump/rump_namei.h Tue Apr 21 03:19:03 2015 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: rump_namei.h,v 1.26 2015/01/16 21:41:07 dennis Exp $ */
+/* $NetBSD: rump_namei.h,v 1.27 2015/04/21 03:19:03 riastradh Exp $ */
/*
* WARNING: GENERATED FILE. DO NOT EDIT
* (edit namei.src and run make namei in src/sys/sys)
* by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp
- * from: NetBSD: namei.src,v 1.35 2015/01/16 21:38:26 dennis Exp
+ * from: NetBSD: namei.src,v 1.37 2015/04/21 03:18:21 riastradh Exp
*/
#ifndef _RUMP_RUMP_NAMEI_H_
@@ -34,8 +34,6 @@
#define RUMP_NAMEI_DOWHITEOUT 0x0040000
#define RUMP_NAMEI_REQUIREDIR 0x0080000
#define RUMP_NAMEI_CREATEDIR 0x0200000
-#define RUMP_NAMEI_INRENAME 0x0400000
-#define RUMP_NAMEI_INRELOOKUP 0x0800000
-#define RUMP_NAMEI_PARAMASK 0x0eee300
+#define RUMP_NAMEI_PARAMASK 0x02ee300
#endif /* _RUMP_RUMP_NAMEI_H_ */
diff -r 130a15be780b -r 13eeb9ccd6dc sys/sys/namei.h
--- a/sys/sys/namei.h Tue Apr 21 03:18:21 2015 +0000
+++ b/sys/sys/namei.h Tue Apr 21 03:19:03 2015 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: namei.h,v 1.92 2015/01/16 21:41:07 dennis Exp $ */
+/* $NetBSD: namei.h,v 1.93 2015/04/21 03:19:03 riastradh Exp $ */
/*
* WARNING: GENERATED FILE. DO NOT EDIT
* (edit namei.src and run make namei in src/sys/sys)
* by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp
- * from: NetBSD: namei.src,v 1.35 2015/01/16 21:38:26 dennis Exp
+ * from: NetBSD: namei.src,v 1.37 2015/04/21 03:18:21 riastradh Exp
*/
/*
@@ -173,9 +173,7 @@
#define DOWHITEOUT 0x0040000 /* do whiteouts */
#define REQUIREDIR 0x0080000 /* must be a directory */
#define CREATEDIR 0x0200000 /* trailing slashes are ok */
-#define INRENAME 0x0400000 /* operation is a part of ``rename'' */
-#define INRELOOKUP 0x0800000 /* set while inside relookup() */
-#define PARAMASK 0x0eee300 /* mask of parameter descriptors */
+#define PARAMASK 0x02ee300 /* mask of parameter descriptors */
/*
* Initialization of a nameidata structure.
@@ -354,8 +352,6 @@
#define NAMEI_DOWHITEOUT 0x0040000
#define NAMEI_REQUIREDIR 0x0080000
#define NAMEI_CREATEDIR 0x0200000
-#define NAMEI_INRENAME 0x0400000
-#define NAMEI_INRELOOKUP 0x0800000
-#define NAMEI_PARAMASK 0x0eee300
+#define NAMEI_PARAMASK 0x02ee300
#endif /* !_SYS_NAMEI_H_ */
Home |
Main Index |
Thread Index |
Old Index