From 728b872648a82b95779fbec9cf890de751346654 Mon Sep 17 00:00:00 2001 From: Jan-Simon Pendry Date: Thu, 11 May 1995 23:04:32 -0800 Subject: [PATCH] add union_revoke operator SCCS-vsn: sys/miscfs/union/union_vnops.c 8.26 --- usr/src/sys/miscfs/union/union_vnops.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/usr/src/sys/miscfs/union/union_vnops.c b/usr/src/sys/miscfs/union/union_vnops.c index 1a4b2755ec..2de83d4605 100644 --- a/usr/src/sys/miscfs/union/union_vnops.c +++ b/usr/src/sys/miscfs/union/union_vnops.c @@ -8,7 +8,7 @@ * * %sccs.include.redist.c% * - * @(#)union_vnops.c 8.25 (Berkeley) %G% + * @(#)union_vnops.c 8.26 (Berkeley) %G% */ #include @@ -796,6 +796,22 @@ union_select(ap) ap->a_cred, ap->a_p)); } +int +union_revoke(ap) + struct vop_revoke_args /* { + struct vnode *a_vp; + int a_flags; + } */ *ap; +{ + struct vnode *vp = ap->a_vp; + + if (UPPERVP(vp)) + VOP_REVOKE(UPPERVP(vp), ap->a_flags); + if (LOWERVP(vp)) + VOP_REVOKE(UPPERVP(vp), ap->a_flags); + vgone(vp); +} + int union_mmap(ap) struct vop_mmap_args /* { @@ -1283,7 +1299,7 @@ union_inactive(ap) } if ((un->un_flags & UN_CACHED) == 0) - VOP_REVOKE(ap->a_vp, 0); + vgone(ap->a_vp); return (0); } @@ -1322,9 +1338,10 @@ start: un->un_flags |= UN_ULOCK; } #ifdef DIAGNOSTIC - if (un->un_flags & UN_KLOCK) + if (un->un_flags & UN_KLOCK) { vprint("union: dangling klock", vp); panic("union: dangling upper lock (%lx)", vp); + } #endif } @@ -1538,6 +1555,7 @@ struct vnodeopv_entry_desc union_vnodeop_entries[] = { { &vop_lease_desc, union_lease }, /* lease */ { &vop_ioctl_desc, union_ioctl }, /* ioctl */ { &vop_select_desc, union_select }, /* select */ + { &vop_revoke_desc, union_revoke }, /* revoke */ { &vop_mmap_desc, union_mmap }, /* mmap */ { &vop_fsync_desc, union_fsync }, /* fsync */ { &vop_seek_desc, union_seek }, /* seek */ -- 2.20.1