Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/union Remove a needless vnode lock/unlock dance. Thi...
details: https://anonhg.NetBSD.org/src/rev/f21a639794dc
branches: trunk
changeset: 771218:f21a639794dc
user: hannken <hannken%NetBSD.org@localhost>
date: Mon Nov 14 18:38:13 2011 +0000
description:
Remove a needless vnode lock/unlock dance. This is a leftover from the
removal of VOP_LEASE().
Function union_removed_upper() always works on unlocked upper vnodes so
remove the test-and-unlock and add an assertion.
diffstat:
sys/fs/union/union_subr.c | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diffs (50 lines):
diff -r 46d782f36037 -r f21a639794dc sys/fs/union/union_subr.c
--- a/sys/fs/union/union_subr.c Mon Nov 14 18:35:12 2011 +0000
+++ b/sys/fs/union/union_subr.c Mon Nov 14 18:38:13 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_subr.c,v 1.51 2011/10/18 09:22:53 hannken Exp $ */
+/* $NetBSD: union_subr.c,v 1.52 2011/11/14 18:38:13 hannken Exp $ */
/*
* Copyright (c) 1994
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.51 2011/10/18 09:22:53 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.52 2011/11/14 18:38:13 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -638,11 +638,6 @@
uio.uio_offset = 0;
UIO_SETUP_SYSSPACE(&uio);
- VOP_UNLOCK(fvp); /* XXX */
- vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY); /* XXX */
- VOP_UNLOCK(tvp); /* XXX */
- vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY); /* XXX */
-
tbuf = malloc(MAXBSIZE, M_TEMP, M_WAITOK);
/* ugly loop follows... */
@@ -961,6 +956,7 @@
{
int hash;
+ KASSERT((un->un_flags & UN_ULOCK) == 0);
#if 1
/*
* We do not set the uppervp to NULLVP here, because lowervp
@@ -984,11 +980,6 @@
LIST_REMOVE(un, un_cache);
}
mutex_exit(&unheadlock[hash]);
-
- if (un->un_flags & UN_ULOCK) {
- un->un_flags &= ~UN_ULOCK;
- VOP_UNLOCK(un->un_uppervp);
- }
}
#if 0
Home |
Main Index |
Thread Index |
Old Index