Module Name: src
Committed By: pooka
Date: Thu Jan 13 10:26:47 UTC 2011
Modified Files:
src/sys/rump/librump/rumpvfs: rumpfs.c
Log Message:
Respect DOWHITEOUT when removing a directory.
To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 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.87 src/sys/rump/librump/rumpvfs/rumpfs.c:1.88
--- src/sys/rump/librump/rumpvfs/rumpfs.c:1.87 Thu Jan 13 07:27:35 2011
+++ src/sys/rump/librump/rumpvfs/rumpfs.c Thu Jan 13 10:26:47 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpfs.c,v 1.87 2011/01/13 07:27:35 pooka Exp $ */
+/* $NetBSD: rumpfs.c,v 1.88 2011/01/13 10:26:47 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.87 2011/01/13 07:27:35 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.88 2011/01/13 10:26:47 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -618,9 +618,13 @@
if (rd == NULL)
panic("could not find directory entry: %s", cnp->cn_nameptr);
- LIST_REMOVE(rd, rd_entries);
- kmem_free(rd->rd_name, rd->rd_namelen+1);
- kmem_free(rd, sizeof(*rd));
+ if (cnp->cn_flags & DOWHITEOUT) {
+ rd->rd_node = RUMPFS_WHITEOUT;
+ } else {
+ LIST_REMOVE(rd, rd_entries);
+ kmem_free(rd->rd_name, rd->rd_namelen+1);
+ kmem_free(rd, sizeof(*rd));
+ }
}
/*