Remove inapropriate use of VOP_ISLOCKED()

This produced races resulting in panics and filesystem corruptions
under some circumstances.

Reviewed by: luoqi chen <luoqi@freebsd.org>
Reviewed by: Kirk McKusick <mckusick@mckusick.com>
Submitted by: Matt Dillon <dillon@freebsd.org>
This commit is contained in:
Julian Elischer 1999-03-02 20:26:39 +00:00
parent 7e8dac41cb
commit 8b3bd42341
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@
* 2. Absolutely no warranty of function or purpose is made by the author
* John S. Dyson.
*
* $Id: vfs_bio.c,v 1.198 1999/01/24 00:51:11 dillon Exp $
* $Id: vfs_bio.c,v 1.199 1999/01/27 21:49:58 dillon Exp $
*/
/*
@ -1551,7 +1551,7 @@ loop:
* Normally the vnode is locked so this isn't a problem.
* VBLK type I/O requests, however, don't lock the vnode.
*/
if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE && gbincore(vp, blkno)) {
if (gbincore(vp, blkno)) {
bp->b_flags |= B_INVAL;
brelse(bp);
goto loop;