summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-12-04 17:48:06 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-12-21 01:36:21 -0500
commit3f1cf04ff9877bf043795d05bb6704d0a85bcd80 (patch)
treeaacfe86ccbe9396a00490ba8f911b04c2e9a94ef
parent400af9a398186851103e27d848ef42be8870072b (diff)
downloadlinux-3f1cf04ff9877bf043795d05bb6704d0a85bcd80.tar.gz
linux-3f1cf04ff9877bf043795d05bb6704d0a85bcd80.zip
bcachefs: Silence "unable to allocate journal write" if we're already RO
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/journal_io.c5
1 files 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