From 7c50140fce00120b1dcf674759393267689ca2d8 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Fri, 7 Jul 2023 17:09:26 -0400 Subject: bcachefs: Convert more -EROFS to private error codes Signed-off-by: Kent Overstreet --- fs/bcachefs/ec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/bcachefs/ec.c') diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c index d35a59e2d0e9..efbb7cf7a5d0 100644 --- a/fs/bcachefs/ec.c +++ b/fs/bcachefs/ec.c @@ -1024,7 +1024,7 @@ static void zero_out_rest_of_ec_bucket(struct bch_fs *c, int ret; if (!bch2_dev_get_ioref(ca, WRITE)) { - s->err = -EROFS; + s->err = -BCH_ERR_erofs_no_writes; return; } @@ -1401,7 +1401,7 @@ __bch2_ec_stripe_head_get(struct btree_trans *trans, return ERR_PTR(ret); if (test_bit(BCH_FS_GOING_RO, &c->flags)) { - h = ERR_PTR(-EROFS); + h = ERR_PTR(-BCH_ERR_erofs_no_writes); goto found; } @@ -1774,7 +1774,7 @@ static void __bch2_ec_stop(struct bch_fs *c, struct bch_dev *ca) } goto unlock; found: - h->s->err = -EROFS; + h->s->err = -BCH_ERR_erofs_no_writes; ec_stripe_set_pending(c, h); unlock: mutex_unlock(&h->lock); -- cgit v1.2.3