From 5f659376fc1b9ad23b00a35242179b8961e0bc2d Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 12 Oct 2022 16:11:31 -0400 Subject: bcachefs: Suppress -EROFS messages when shutting down This isn't actually an error condition, this just indicates a normal shutdown - no reason for these to be in the log. Signed-off-by: Kent Overstreet --- fs/bcachefs/io.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'fs/bcachefs/io.c') diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index 491fad4dfb28..27265ba35fac 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -675,15 +675,17 @@ static void __bch2_write_index(struct bch_write_op *op) op->written += sectors_start - keylist_sectors(keys); - if (ret) { + if (ret && !bch2_err_matches(ret, EROFS)) { struct bkey_i *k = bch2_keylist_front(&op->insert_keys); bch_err_inum_offset_ratelimited(c, k->k.p.inode, k->k.p.offset << 9, "write error while doing btree update: %s", bch2_err_str(ret)); - goto err; } + + if (ret) + goto err; } out: /* If some a bucket wasn't written, we can't erasure code it: */ -- cgit v1.2.3