mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
bcachefs: Fix journal_flush_seq()
The error check was inverted - leading fsyncs to get stuck and hang, oops. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
3eb26d0157
commit
c5bb169034
@ -552,16 +552,13 @@ int bch2_journal_flush_seq_async(struct journal *j, u64 seq,
|
||||
struct journal_buf *buf;
|
||||
int ret = 0;
|
||||
|
||||
if (seq <= j->err_seq)
|
||||
return -EIO;
|
||||
|
||||
if (seq <= j->seq_ondisk)
|
||||
return 1;
|
||||
|
||||
spin_lock(&j->lock);
|
||||
|
||||
/* Recheck under lock: */
|
||||
if (seq <= j->err_seq) {
|
||||
if (j->err_seq && seq >= j->err_seq) {
|
||||
ret = -EIO;
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user