summaryrefslogtreecommitdiffstats
path: root/sys/fs/unionfs/union.h
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1998-01-20 10:02:54 +0000
committerkato <kato@FreeBSD.org>1998-01-20 10:02:54 +0000
commitd49fde64e88ed0930d98ea5752325d23d452a74c (patch)
treef94a3f25ebb61ec2c816446513a36a8e80e7c635 /sys/fs/unionfs/union.h
parent1b94ff548145fb10224df86f77d684ccfa34e93a (diff)
downloadFreeBSD-src-d49fde64e88ed0930d98ea5752325d23d452a74c.zip
FreeBSD-src-d49fde64e88ed0930d98ea5752325d23d452a74c.tar.gz
- Move SETKLOC and CLEARKLOCK macros into uion.h.
- Set UN_ULOCK in union_lock() when UN_KLOCK is set. Caller expects that vnode is locked correctly, and may call another function which expects locked vnode and may unlock the vnode. - Do not assume the behavior of inside functions in FreeBSD's vfs_suber.c is same as 4.4BSD-Lite2. Vnode may be locked in vget() even though flag is zero. (Locked vnode is, of course, unlocked before returning from vget.)
Diffstat (limited to 'sys/fs/unionfs/union.h')
-rw-r--r--sys/fs/unionfs/union.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/fs/unionfs/union.h b/sys/fs/unionfs/union.h
index 03e7033..f3bbb89 100644
--- a/sys/fs/unionfs/union.h
+++ b/sys/fs/unionfs/union.h
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union.h 8.9 (Berkeley) 12/10/94
- * $Id: union.h,v 1.8 1997/02/22 09:40:40 peter Exp $
+ * $Id: union.h,v 1.9 1997/11/18 15:07:34 phk Exp $
*/
struct union_args {
@@ -94,6 +94,9 @@ struct union_node {
#define UN_KLOCK 0x08 /* Keep upper node locked on vput */
#define UN_CACHED 0x10 /* In union cache */
+#define SETKLOCK(un) (un)->un_flags |= UN_KLOCK
+#define CLEARKLOCK(un) (un)->un_flags &= ~UN_KLOCK
+
extern int union_allocvp __P((struct vnode **, struct mount *,
struct vnode *, struct vnode *,
struct componentname *, struct vnode *,
OpenPOWER on IntegriCloud