Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs SAVENAME and HASBUF namei flags hav...
details: https://anonhg.NetBSD.org/src/rev/8de13d90720e
branches: trunk
changeset: 759133:8de13d90720e
user: dholland <dholland%NetBSD.org@localhost>
date: Tue Nov 30 10:48:27 2010 +0000
description:
SAVENAME and HASBUF namei flags have been removed; update rumpvfs accordingly.
diffstat:
sys/rump/librump/rumpvfs/rump_vfs.c | 15 ++++-----------
sys/rump/librump/rumpvfs/rumpfs.c | 12 ++----------
2 files changed, 6 insertions(+), 21 deletions(-)
diffs (129 lines):
diff -r cf5fb7cc05e0 -r 8de13d90720e sys/rump/librump/rumpvfs/rump_vfs.c
--- a/sys/rump/librump/rumpvfs/rump_vfs.c Tue Nov 30 10:46:59 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rump_vfs.c Tue Nov 30 10:48:27 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_vfs.c,v 1.60 2010/11/21 16:19:19 pooka Exp $ */
+/* $NetBSD: rump_vfs.c,v 1.61 2010/11/30 10:48:27 dholland Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.60 2010/11/21 16:19:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.61 2010/11/30 10:48:27 dholland Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -186,9 +186,7 @@
cnp->cn_nameiop = nameiop;
cnp->cn_flags = flags;
- cnp->cn_pnbuf = PNBUF_GET();
- strcpy(cnp->cn_pnbuf, name);
- cnp->cn_nameptr = cnp->cn_pnbuf;
+ cnp->cn_nameptr = name;
cnp->cn_namelen = namelen;
cnp->cn_hash = namei_hash(name, &cp);
@@ -204,8 +202,6 @@
if (flags & RUMPCN_FREECRED)
rump_cred_put(cnp->cn_cred);
- if ((cnp->cn_flags & SAVENAME) == 0 || flags & RUMPCN_FORCEFREE)
- PNBUF_PUT(cnp->cn_pnbuf);
kmem_free(cnp, sizeof(*cnp));
}
@@ -213,10 +209,9 @@
rump_checksavecn(struct componentname *cnp)
{
- if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) {
+ if ((cnp->cn_flags & SAVESTART) == 0) {
return 0;
} else {
- cnp->cn_flags |= HASBUF;
return 1;
}
}
@@ -265,8 +260,6 @@
cnp = kmem_alloc(sizeof(*cnp), KM_SLEEP);
memcpy(cnp, &nd.ni_cnd, sizeof(*cnp));
*cnpp = cnp;
- } else if (nd.ni_cnd.cn_flags & HASBUF) {
- panic("%s: pathbuf mismatch", __func__);
}
pathbuf_destroy(pb);
diff -r cf5fb7cc05e0 -r 8de13d90720e sys/rump/librump/rumpvfs/rumpfs.c
--- a/sys/rump/librump/rumpvfs/rumpfs.c Tue Nov 30 10:46:59 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rumpfs.c Tue Nov 30 10:48:27 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpfs.c,v 1.75 2010/11/30 01:22:50 dholland Exp $ */
+/* $NetBSD: rumpfs.c,v 1.76 2010/11/30 10:48:27 dholland Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.75 2010/11/30 01:22:50 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.76 2010/11/30 10:48:27 dholland Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -731,11 +731,8 @@
return ENOENT;
if (!rd && (cnp->cn_flags & ISLASTCN) && cnp->cn_nameiop == CREATE) {
- cnp->cn_flags |= SAVENAME;
return EJUSTRETURN;
}
- if ((cnp->cn_flags & ISLASTCN) && cnp->cn_nameiop == DELETE)
- cnp->cn_flags |= SAVENAME;
rn = rd->rd_node;
@@ -814,7 +811,6 @@
makedir(rnd, cnp, rn);
out:
- PNBUF_PUT(cnp->cn_pnbuf);
vput(dvp);
return rv;
}
@@ -843,7 +839,6 @@
rn->rn_flags |= RUMPNODE_CANRECLAIM;
out:
- PNBUF_PUT(cnp->cn_pnbuf);
vput(dvp);
vput(vp);
@@ -875,7 +870,6 @@
freedir(rnd, cnp);
rn->rn_flags |= RUMPNODE_CANRECLAIM;
- PNBUF_PUT(cnp->cn_pnbuf);
vput(dvp);
vput(vp);
@@ -906,7 +900,6 @@
makedir(rnd, cnp, rn);
out:
- PNBUF_PUT(cnp->cn_pnbuf);
vput(dvp);
return rv;
}
@@ -937,7 +930,6 @@
makedir(rnd, cnp, rn);
out:
- PNBUF_PUT(cnp->cn_pnbuf);
vput(dvp);
return rv;
}
Home |
Main Index |
Thread Index |
Old Index