summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_gc.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-12-11 20:37:11 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:49 -0400
commit858536c7cea8bb86511501768ef797d103642498 (patch)
treeb19f4933c893bb2208478f55b7c169d2cb6c8ff8 /fs/bcachefs/btree_gc.c
parente9a1da97377f89f09e6b0b484554fe7a0e2dbe3e (diff)
downloadlinux-858536c7cea8bb86511501768ef797d103642498.tar.gz
linux-858536c7cea8bb86511501768ef797d103642498.tar.bz2
linux-858536c7cea8bb86511501768ef797d103642498.zip
bcachefs: Convert EROFS errors to private error codes
More error code improvements - this gets us more useful error messages. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_gc.c')
-rw-r--r--fs/bcachefs/btree_gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c
index fdc9de6e9908..e43ccf896e8e 100644
--- a/fs/bcachefs/btree_gc.c
+++ b/fs/bcachefs/btree_gc.c
@@ -1988,7 +1988,7 @@ int bch2_gc_gens(struct bch_fs *c)
NULL, NULL,
BTREE_INSERT_NOFAIL,
gc_btree_gens_key(&trans, &iter, k));
- if (ret && ret != -EROFS)
+ if (ret && !bch2_err_matches(ret, EROFS))
bch_err(c, "error recalculating oldest_gen: %s", bch2_err_str(ret));
if (ret)
goto err;
@@ -2001,7 +2001,7 @@ int bch2_gc_gens(struct bch_fs *c)
NULL, NULL,
BTREE_INSERT_NOFAIL,
bch2_alloc_write_oldest_gen(&trans, &iter, k));
- if (ret && ret != -EROFS)
+ if (ret && !bch2_err_matches(ret, EROFS))
bch_err(c, "error writing oldest_gen: %s", bch2_err_str(ret));
if (ret)
goto err;