diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-11-19 22:39:08 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:48 -0400 |
commit | 78c0b75c34209c471616566b3978eac4c1c53e99 (patch) | |
tree | e5c64b4d5d643e6170f2acfff1f279333235b398 /fs/bcachefs/quota.c | |
parent | 5f659376fc1b9ad23b00a35242179b8961e0bc2d (diff) | |
download | lwn-78c0b75c34209c471616566b3978eac4c1c53e99.tar.gz lwn-78c0b75c34209c471616566b3978eac4c1c53e99.zip |
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.c | 6 |
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; |