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:
parent
8dc799a226
commit
d7127837a2
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user