42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
From fe236881929435323d0f4f144e1c3807d443c60c Mon Sep 17 00:00:00 2001
|
|
From: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Date: Wed, 4 Dec 2024 17:48:06 -0500
|
|
Subject: [PATCH 165/233] bcachefs: Silence "unable to allocate journal write"
|
|
if we're already RO
|
|
Content-Type: text/plain; charset="utf-8"
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
|
|
---
|
|
fs/bcachefs/journal_io.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
|
|
index bb69d80886b5..e7a43400a587 100644
|
|
--- a/fs/bcachefs/journal_io.c
|
|
+++ b/fs/bcachefs/journal_io.c
|
|
@@ -2032,7 +2032,7 @@ CLOSURE_CALLBACK(bch2_journal_write)
|
|
bch2_journal_do_discards(j);
|
|
}
|
|
|
|
- if (ret) {
|
|
+ if (ret && !bch2_journal_error(j)) {
|
|
struct printbuf buf = PRINTBUF;
|
|
buf.atomic++;
|
|
|
|
@@ -2044,8 +2044,9 @@ CLOSURE_CALLBACK(bch2_journal_write)
|
|
spin_unlock(&j->lock);
|
|
bch2_print_string_as_lines(KERN_ERR, buf.buf);
|
|
printbuf_exit(&buf);
|
|
- goto err;
|
|
}
|
|
+ if (ret)
|
|
+ goto err;
|
|
|
|
/*
|
|
* write is allocated, no longer need to account for it in
|
|
--
|
|
2.45.2
|
|
|