Confirming Peter's fix (locking 101: release the lock before you go

to sleep). Locking 101, part 2: do not look at buffer contents after
you have been asleep. There is no telling what wonderous changes may
have occurred.
This commit is contained in:
Kirk McKusick 2000-01-13 20:03:22 +00:00
parent 8dc799a226
commit d7127837a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55931
2 changed files with 0 additions and 4 deletions

View File

@ -4566,8 +4566,6 @@ getdirtybuf(bpp, waitfor)
FREE_LOCK_INTERLOCKED(&lk);
tsleep(&bp->b_xflags, PRIBIO, "getbuf", 0);
ACQUIRE_LOCK_INTERLOCKED(&lk);
if (bp->b_xflags & BX_BKGRDINPROG)
panic("getdirtybuf: still writing");
continue;
}
if (waitfor != MNT_WAIT)

View File

@ -4566,8 +4566,6 @@ getdirtybuf(bpp, waitfor)
FREE_LOCK_INTERLOCKED(&lk);
tsleep(&bp->b_xflags, PRIBIO, "getbuf", 0);
ACQUIRE_LOCK_INTERLOCKED(&lk);
if (bp->b_xflags & BX_BKGRDINPROG)
panic("getdirtybuf: still writing");
continue;
}
if (waitfor != MNT_WAIT)