mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 05:45:20 +00:00
bcachefs: Fix journal getting stuck on a flush commit
silly race Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
a2d23f3d91
commit
0435773239
@ -1762,11 +1762,13 @@ static CLOSURE_CALLBACK(journal_write_preflush)
|
||||
|
||||
if (j->seq_ondisk + 1 != le64_to_cpu(w->data->seq)) {
|
||||
spin_lock(&j->lock);
|
||||
closure_wait(&j->async_wait, cl);
|
||||
if (j->seq_ondisk + 1 != le64_to_cpu(w->data->seq)) {
|
||||
closure_wait(&j->async_wait, cl);
|
||||
spin_unlock(&j->lock);
|
||||
continue_at(cl, journal_write_preflush, j->wq);
|
||||
return;
|
||||
}
|
||||
spin_unlock(&j->lock);
|
||||
|
||||
continue_at(cl, journal_write_preflush, j->wq);
|
||||
return;
|
||||
}
|
||||
|
||||
if (w->separate_flush) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user