summaryrefslogtreecommitdiff
path: root/fs/bcachefs/quota.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-20 06:39:08 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:48 +0300
commit78c0b75c34209c471616566b3978eac4c1c53e99 (patch)
treee5c64b4d5d643e6170f2acfff1f279333235b398 /fs/bcachefs/quota.c
parent5f659376fc1b9ad23b00a35242179b8961e0bc2d (diff)
downloadlinux-78c0b75c34209c471616566b3978eac4c1c53e99.tar.xz
bcachefs: More errcode cleanup
We shouldn't be overloading standard error codes now that we have provisions for bcachefs-specific errorcodes: this patch converts super.c and super-io.c to per error site errcodes, with a bit of cleanup. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/quota.c')
-rw-r--r--fs/bcachefs/quota.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/quota.c b/fs/bcachefs/quota.c
index 7f74c026e9da..ededc826e9a0 100644
--- a/fs/bcachefs/quota.c
+++ b/fs/bcachefs/quota.c
@@ -26,7 +26,7 @@ static int bch2_sb_quota_validate(struct bch_sb *sb, struct bch_sb_field *f,
if (vstruct_bytes(&q->field) < sizeof(*q)) {
prt_printf(err, "wrong size (got %zu should be %zu)",
vstruct_bytes(&q->field), sizeof(*q));
- return -EINVAL;
+ return -BCH_ERR_invalid_sb_quota;
}
return 0;
@@ -64,13 +64,13 @@ int bch2_quota_invalid(const struct bch_fs *c, struct bkey_s_c k,
if (k.k->p.inode >= QTYP_NR) {
prt_printf(err, "invalid quota type (%llu >= %u)",
k.k->p.inode, QTYP_NR);
- return -EINVAL;
+ return -BCH_ERR_invalid_bkey;
}
if (bkey_val_bytes(k.k) != sizeof(struct bch_quota)) {
prt_printf(err, "incorrect value size (%zu != %zu)",
bkey_val_bytes(k.k), sizeof(struct bch_quota));
- return -EINVAL;
+ return -BCH_ERR_invalid_bkey;
}
return 0;