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 Respect DOWHITEOUT when removing a ...
details: https://anonhg.NetBSD.org/src/rev/7e5731565299
branches: trunk
changeset: 760802:7e5731565299
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Jan 13 10:26:47 2011 +0000
description:
Respect DOWHITEOUT when removing a directory.
diffstat:
sys/rump/librump/rumpvfs/rumpfs.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r e636f7bf05b2 -r 7e5731565299 sys/rump/librump/rumpvfs/rumpfs.c
--- a/sys/rump/librump/rumpvfs/rumpfs.c Thu Jan 13 10:03:29 2011 +0000
+++ b/sys/rump/librump/rumpvfs/rumpfs.c Thu Jan 13 10:26:47 2011 +0000
@@ -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));
+ }
}
/*
Home |
Main Index |
Thread Index |
Old Index