Fixes: 9c5d38bba0342 ("bcachefs: Don't print out duplicate fsck errors")
Signed-off-by: David Disseldorp <[email protected]>
---
 fs/bcachefs/error.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c
index 95afa7bf20205..b2c188c2d4e37 100644
--- a/fs/bcachefs/error.c
+++ b/fs/bcachefs/error.c
@@ -251,6 +251,11 @@ int __bch2_fsck_err(struct bch_fs *c,
        prt_vprintf(out, fmt, args);
        va_end(args);
 
+       if (out->allocation_failure) {
+               ret = -ENOMEM;
+               goto err;
+       }
+
        /* Custom fix/continue/recreate/etc.? */
        if (out->buf[out->pos - 1] == '?') {
                const char *p = strrchr(out->buf, ',');
-- 
2.43.0


Reply via email to