summaryrefslogtreecommitdiffstats
path: root/sys/miscfs/union
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1998-02-26 03:23:56 +0000
committerkato <kato@FreeBSD.org>1998-02-26 03:23:56 +0000
commit0712ea24bf42cbaa2e009b77c3560d846ac133ea (patch)
tree7b7981f04b57f40887d58ce57717d32cf62bd8c0 /sys/miscfs/union
parentd8d81bef89b9087c616382e51f9ca89d9a6f449e (diff)
downloadFreeBSD-src-0712ea24bf42cbaa2e009b77c3560d846ac133ea.zip
FreeBSD-src-0712ea24bf42cbaa2e009b77c3560d846ac133ea.tar.gz
Deleted KLOCK-hack.
Diffstat (limited to 'sys/miscfs/union')
-rw-r--r--sys/miscfs/union/union.h6
-rw-r--r--sys/miscfs/union/union_subr.c18
-rw-r--r--sys/miscfs/union/union_vnops.c12
3 files changed, 7 insertions, 29 deletions
diff --git a/sys/miscfs/union/union.h b/sys/miscfs/union/union.h
index 442fc95..4deb6d4 100644
--- a/sys/miscfs/union/union.h
+++ b/sys/miscfs/union/union.h
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union.h 8.9 (Berkeley) 12/10/94
- * $Id: union.h,v 1.10 1998/01/20 10:02:50 kato Exp $
+ * $Id: union.h,v 1.11 1998/02/10 03:32:03 kato Exp $
*/
struct union_args {
@@ -93,10 +93,6 @@ struct union_node {
#define UN_ULOCK 0x04 /* Upper node is locked */
#define UN_KLOCK 0x08 /* Keep upper node locked on vput */
#define UN_CACHED 0x10 /* In union cache */
-#define UN_GLOCK 0x20 /* Keep upper node locked on vget */
-
-#define SETGLOCK(un) (un)->un_flags |= UN_GLOCK
-#define CLEARGLOCK(un) (un)->un_flags &= ~UN_GLOCK
extern int union_allocvp __P((struct vnode **, struct mount *,
struct vnode *, struct vnode *,
diff --git a/sys/miscfs/union/union_subr.c b/sys/miscfs/union/union_subr.c
index 8ba3d87..879b0d0 100644
--- a/sys/miscfs/union/union_subr.c
+++ b/sys/miscfs/union/union_subr.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_subr.c 8.20 (Berkeley) 5/20/95
- * $Id: union_subr.c,v 1.27 1998/02/06 12:13:44 eivind Exp $
+ * $Id: union_subr.c,v 1.28 1998/02/10 03:32:05 kato Exp $
*/
#include <sys/param.h>
@@ -363,27 +363,11 @@ loop:
(un->un_uppervp == uppervp ||
un->un_uppervp == NULLVP) &&
(UNIONTOV(un)->v_mount == mp)) {
- /*
- * Do not assume that vget() does not
- * lock the vnode even though flags
- * argument is 0.
- */
- if ((un->un_uppervp != NULLVP) &&
- ((un->un_flags & UN_KLOCK) == 0)) {
- SETGLOCK(un);
- klocked = 1;
- } else {
- klocked = 0;
- }
if (vget(UNIONTOV(un), 0,
cnp ? cnp->cn_proc : NULL)) {
- if (klocked)
- CLEARGLOCK(un);
union_list_unlock(hash);
goto loop;
}
- if (klocked)
- CLEARGLOCK(un);
break;
}
}
diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c
index c54dcce..627123c 100644
--- a/sys/miscfs/union/union_vnops.c
+++ b/sys/miscfs/union/union_vnops.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_vnops.c 8.32 (Berkeley) 6/23/95
- * $Id: union_vnops.c,v 1.53 1998/02/06 12:13:44 eivind Exp $
+ * $Id: union_vnops.c,v 1.54 1998/02/10 03:32:07 kato Exp $
*/
#include <sys/param.h>
@@ -1533,11 +1533,9 @@ start:
if (un->un_uppervp != NULLVP) {
if (((un->un_flags & UN_ULOCK) == 0) &&
(vp->v_usecount != 0)) {
- if ((un->un_flags & UN_GLOCK) == 0) {
- error = vn_lock(un->un_uppervp, flags, p);
- if (error)
- return (error);
- }
+ error = vn_lock(un->un_uppervp, flags, p);
+ if (error)
+ return (error);
un->un_flags |= UN_ULOCK;
}
#ifdef DIAGNOSTIC
@@ -1602,7 +1600,7 @@ union_unlock(ap)
un->un_flags &= ~UN_LOCKED;
- if ((un->un_flags & (UN_ULOCK|UN_KLOCK|UN_GLOCK)) == UN_ULOCK)
+ if ((un->un_flags & (UN_ULOCK|UN_KLOCK)) == UN_ULOCK)
VOP_UNLOCK(un->un_uppervp, 0, p);
un->un_flags &= ~(UN_ULOCK|UN_KLOCK);
OpenPOWER on IntegriCloud