Pass the correct nonblocking flag to VOP_CLOSE() in vclean().

VOP_CLOSE() takes `F' (file) flags, not `IO' flags.  At least that's
what close() passes.  I previously fixed ttylclose() to check
FNONBLOCK instead of IO_NDELAY.  This broke the call from vclean()
and cleaning of ptys sometimes deadlocked.
This commit is contained in:
Bruce Evans 1995-06-27 21:29:08 +00:00
parent 20dc68b204
commit 6acceb40dc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9340
2 changed files with 6 additions and 4 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
* $Id: vfs_subr.c,v 1.29 1995/05/12 04:24:53 davidg Exp $
* $Id: vfs_subr.c,v 1.30 1995/05/21 21:38:51 davidg Exp $
*/
/*
@ -45,6 +45,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/file.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/time.h>
@ -998,7 +999,7 @@ vclean(vp, flags)
*/
if (active) {
if (flags & DOCLOSE)
VOP_CLOSE(vp, IO_NDELAY, NOCRED, NULL);
VOP_CLOSE(vp, FNONBLOCK, NOCRED, NULL);
VOP_INACTIVE(vp);
}
/*

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
* $Id: vfs_subr.c,v 1.29 1995/05/12 04:24:53 davidg Exp $
* $Id: vfs_subr.c,v 1.30 1995/05/21 21:38:51 davidg Exp $
*/
/*
@ -45,6 +45,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/file.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/time.h>
@ -998,7 +999,7 @@ vclean(vp, flags)
*/
if (active) {
if (flags & DOCLOSE)
VOP_CLOSE(vp, IO_NDELAY, NOCRED, NULL);
VOP_CLOSE(vp, FNONBLOCK, NOCRED, NULL);
VOP_INACTIVE(vp);
}
/*