Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/union CID-1428639: make sure we always initialiaze ha...
details: https://anonhg.NetBSD.org/src/rev/dc4d1a2f18d4
branches: trunk
changeset: 359087:dc4d1a2f18d4
user: christos <christos%NetBSD.org@localhost>
date: Sun Jan 28 15:48:44 2018 +0000
description:
CID-1428639: make sure we always initialiaze hash, because if ultimately
the file is not found and we end up looping we need them.
diffstat:
sys/fs/union/union_subr.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (42 lines):
diff -r e0fd5e6a7570 -r dc4d1a2f18d4 sys/fs/union/union_subr.c
--- a/sys/fs/union/union_subr.c Sun Jan 28 15:00:42 2018 +0000
+++ b/sys/fs/union/union_subr.c Sun Jan 28 15:48:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_subr.c,v 1.76 2017/07/17 09:22:36 hannken Exp $ */
+/* $NetBSD: union_subr.c,v 1.77 2018/01/28 15:48:44 christos Exp $ */
/*
* Copyright (c) 1994
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.76 2017/07/17 09:22:36 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.77 2018/01/28 15:48:44 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -377,11 +377,6 @@
lowervp = NULLVP;
}
- if (!docache) {
- un = NULL;
- goto found;
- }
-
/*
* If both uppervp and lowervp are not NULL we have to
* search union nodes with one vnode as NULL too.
@@ -394,6 +389,11 @@
hash[2] = UNION_HASH(NULLVP, lowervp);
}
+ if (!docache) {
+ un = NULL;
+ goto found;
+ }
+
loop:
mutex_enter(&uhash_lock);
Home |
Main Index |
Thread Index |
Old Index