Module Name: src
Committed By: pooka
Date: Tue Mar 1 15:14:35 UTC 2011
Modified Files:
src/sys/rump/librump/rumpvfs: rumpfs.c
Log Message:
Reset node's parent pointer when it's removed. Technically the
parent still exists, but allows us to avoid complicated g/c algorithms
if the parent *is* removed.
To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/rump/librump/rumpvfs/rumpfs.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/rump/librump/rumpvfs/rumpfs.c
diff -u src/sys/rump/librump/rumpvfs/rumpfs.c:1.91 src/sys/rump/librump/rumpvfs/rumpfs.c:1.92
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.91 Wed Feb 2 15:58:09 2011
+++ src/sys/rump/librump/rumpvfs/rumpfs.c Tue Mar 1 15:14:35 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpfs.c,v 1.91 2011/02/02 15:58:09 pooka Exp $ */
+/* $NetBSD: rumpfs.c,v 1.92 2011/03/01 15:14:35 pooka 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.91 2011/02/02 15:58:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.92 2011/03/01 15:14:35 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -733,8 +733,8 @@
goto getvnode;
} else {
if (dotdot) {
- rn = rnd->rn_parent;
- goto getvnode;
+ if ((rn = rnd->rn_parent) != NULL)
+ goto getvnode;
} else {
LIST_FOREACH(rd, &rnd->rn_dir, rd_entries) {
if (rd->rd_namelen == cnp->cn_namelen &&
@@ -927,6 +927,7 @@
freedir(rnd, cnp);
rn->rn_flags |= RUMPNODE_CANRECLAIM;
+ rn->rn_parent = NULL;
out:
vput(dvp);