X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/a4c61dc4b9e6976dd3ac79ced17e0113774b9f0b..e2a2f3a732c54c31e87edb0d0a789e899c13ad24:/usr/src/sys/miscfs/union/union.h diff --git a/usr/src/sys/miscfs/union/union.h b/usr/src/sys/miscfs/union/union.h index 9657ba9987..8041fb77a2 100644 --- a/usr/src/sys/miscfs/union/union.h +++ b/usr/src/sys/miscfs/union/union.h @@ -8,7 +8,7 @@ * * %sccs.include.redist.c% * - * @(#)union.h 1.9 (Berkeley) %G% + * @(#)union.h 2.1 (Berkeley) %G% */ struct union_args { @@ -56,8 +56,17 @@ struct union_node { #endif }; -#define UN_WANT 0x01 -#define UN_LOCKED 0x02 +#define UN_WANT 0x01 +#define UN_LOCKED 0x02 +#define UN_ULOCK 0x04 /* Upper node is locked */ +#define UN_KLOCK 0x08 /* Keep upper node locked on vput */ + +#define LOCKUVP(un) \ + (((un)->un_flags & UN_ULOCK) ? \ + (0) : \ + (((un)->un_flags |= UN_ULOCK), VOP_LOCK((un)->un_uppervp))) +#define UNLOCKUVP(un) \ + ((un)->un_flags &= ~UN_ULOCK) extern int union_allocvp __P((struct vnode **, struct mount *, struct vnode *, struct vnode *,