--- vpre-2.0.31-7/linux/fs/buffer.c Mon Aug 18 05:49:09 1997 +++ linux/fs/buffer.c Mon Aug 18 05:45:56 1997 @@ -1717,7 +1717,7 @@ * dirty buffers, then make the next write to a * loop device to be a blocking write. * This lets us block--which we _must_ do! */ - if (ndirty == 0 && nr_buffers_type[BUF_DIRTY] > 0) { + if (ndirty == 0 && nr_buffers_type[BUF_DIRTY] > 0 && wrta_cmd != WRITE) { wrta_cmd = WRITE; continue; } @@ -1725,7 +1725,7 @@ /* If there are still a lot of dirty buffers around, skip the sleep and flush some more */ - if(nr_buffers_type[BUF_DIRTY] <= nr_buffers * bdf_prm.b_un.nfract/100) { + if(ndirty == 0 || nr_buffers_type[BUF_DIRTY] <= nr_buffers * bdf_prm.b_un.nfract/100) { wake_up(&bdflush_done); current->signal = 0; interruptible_sleep_on(&bdflush_wait);