diff options
author | dyson <dyson@FreeBSD.org> | 1997-02-10 02:22:35 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1997-02-10 02:22:35 +0000 |
commit | 10f666af84d48e89e4e2960415c9b616fce4077f (patch) | |
tree | 88a944de263165091f0a18abeedbaaccec532407 /sys/fs/umapfs/umap_vnops.c | |
parent | 0960d7e91af3428ffba89b42228d82d8afaa0389 (diff) | |
download | FreeBSD-src-10f666af84d48e89e4e2960415c9b616fce4077f.zip FreeBSD-src-10f666af84d48e89e4e2960415c9b616fce4077f.tar.gz |
This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.
The system boots and can mount UFS filesystems.
Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
Mount_std mounts will not work until the getfsent
library routine is changed.
Reviewed by: various people
Submitted by: Jeffery Hsu <hsu@freebsd.org>
Diffstat (limited to 'sys/fs/umapfs/umap_vnops.c')
-rw-r--r-- | sys/fs/umapfs/umap_vnops.c | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/sys/fs/umapfs/umap_vnops.c b/sys/fs/umapfs/umap_vnops.c index 7c14cda..17064f4 100644 --- a/sys/fs/umapfs/umap_vnops.c +++ b/sys/fs/umapfs/umap_vnops.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)umap_vnops.c 8.3 (Berkeley) 1/5/94 + * @(#)umap_vnops.c 8.6 (Berkeley) 5/22/95 * $FreeBSD$ */ @@ -336,10 +336,52 @@ umap_getattr(ap) return (0); } +/* + * We need to process our own vnode lock and then clear the + * interlock flag as it applies only to our vnode, not the + * vnodes below us on the stack. + */ +int +umap_lock(ap) + struct vop_lock_args /* { + struct vnode *a_vp; + int a_flags; + struct proc *a_p; + } */ *ap; +{ + + vop_nolock(ap); + if ((ap->a_flags & LK_TYPE_MASK) == LK_DRAIN) + return (0); + ap->a_flags &= ~LK_INTERLOCK; + return (null_bypass(ap)); +} + +/* + * We need to process our own vnode unlock and then clear the + * interlock flag as it applies only to our vnode, not the + * vnodes below us on the stack. + */ +int +umap_unlock(ap) + struct vop_unlock_args /* { + struct vnode *a_vp; + int a_flags; + struct proc *a_p; + } */ *ap; +{ + struct vnode *vp = ap->a_vp; + + vop_nounlock(ap); + ap->a_flags &= ~LK_INTERLOCK; + return (null_bypass(ap)); +} + static int umap_inactive(ap) struct vop_inactive_args /* { struct vnode *a_vp; + struct proc *a_p; } */ *ap; { /* @@ -349,6 +391,7 @@ umap_inactive(ap) * cache and reusable. * */ + VOP_UNLOCK(ap->a_vp, 0, ap->a_p); return (0); } @@ -364,7 +407,7 @@ umap_reclaim(ap) /* After this assignment, this node will not be re-used. */ xp->umap_lowervp = NULL; - remque(xp); + LIST_REMOVE(xp, umap_hash); FREE(vp->v_data, M_TEMP); vp->v_data = NULL; vrele(lowervp); @@ -487,6 +530,8 @@ static struct vnodeopv_entry_desc umap_vnodeop_entries[] = { { &vop_default_desc, (vop_t *)umap_bypass }, { &vop_getattr_desc, (vop_t *)umap_getattr }, + { &vop_lock_desc, (vop_t *)umap_lock }, + { &vop_unlock_desc, (vop_t *)umap_unlock }, { &vop_inactive_desc, (vop_t *)umap_inactive }, { &vop_reclaim_desc, (vop_t *)umap_reclaim }, { &vop_print_desc, (vop_t *)umap_print }, |