From 85674180ac0b414993bec634994ea51b28390306 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 6 Oct 1997 20:23:17 +0000 Subject: back out vfs lite2 till after 2.2 --- sys/kern/tty_tty.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'sys/kern/tty_tty.c') diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index 0f70fcbda85..61360e34849 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_tty.c,v 1.4 1997/10/06 15:12:32 csapuntz Exp $ */ +/* $OpenBSD: tty_tty.c,v 1.5 1997/10/06 20:20:05 deraadt Exp $ */ /* $NetBSD: tty_tty.c,v 1.13 1996/03/30 22:24:46 christos Exp $ */ /*- @@ -63,7 +63,7 @@ cttyopen(dev, flag, mode, p) if (ttyvp == NULL) return (ENXIO); - vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p); + VOP_LOCK(ttyvp); #ifdef PARANOID /* * Since group is tty and mode is 620 on most terminal lines @@ -78,7 +78,7 @@ cttyopen(dev, flag, mode, p) if (!error) #endif /* PARANOID */ error = VOP_OPEN(ttyvp, flag, NOCRED, p); - VOP_UNLOCK(ttyvp, 0, p); + VOP_UNLOCK(ttyvp); return (error); } @@ -89,15 +89,14 @@ cttyread(dev, uio, flag) struct uio *uio; int flag; { - struct proc *p = uio->uio_procp; register struct vnode *ttyvp = cttyvp(uio->uio_procp); int error; if (ttyvp == NULL) return (EIO); - vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p); + VOP_LOCK(ttyvp); error = VOP_READ(ttyvp, uio, flag, NOCRED); - VOP_UNLOCK(ttyvp, 0, p); + VOP_UNLOCK(ttyvp); return (error); } @@ -108,15 +107,14 @@ cttywrite(dev, uio, flag) struct uio *uio; int flag; { - struct proc *p = uio->uio_procp; register struct vnode *ttyvp = cttyvp(uio->uio_procp); int error; if (ttyvp == NULL) return (EIO); - vn_lock(ttyvp, LK_EXCLUSIVE | LK_RETRY, p); + VOP_LOCK(ttyvp); error = VOP_WRITE(ttyvp, uio, flag, NOCRED); - VOP_UNLOCK(ttyvp, 0, p); + VOP_UNLOCK(ttyvp); return (error); } -- cgit v1.2.3