diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-03 11:40:32 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-05 13:12:18 -0500 |
commit | a973de85e3976f3418f35cf82112190fac2eeddb (patch) | |
tree | 13e5f0f7a4cbfb578f64db3785bdd2587b865240 /fs/bcachefs/opts.c | |
parent | a8958a1a95b28e16dbca0654eeb6aa458bb1d3b0 (diff) | |
download | linux-a973de85e3976f3418f35cf82112190fac2eeddb.tar.gz linux-a973de85e3976f3418f35cf82112190fac2eeddb.tar.bz2 linux-a973de85e3976f3418f35cf82112190fac2eeddb.zip |
bcachefs: Replace ERANGE with private error codes
We avoid using standard error codes: private, per-callsite error codes
make debugging easier.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.c')
-rw-r--r-- | fs/bcachefs/opts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c index 4ad5880664b0..8dd4046cca41 100644 --- a/fs/bcachefs/opts.c +++ b/fs/bcachefs/opts.c @@ -265,14 +265,14 @@ int bch2_opt_validate(const struct bch_option *opt, u64 v, struct printbuf *err) if (err) prt_printf(err, "%s: too small (min %llu)", opt->attr.name, opt->min); - return -ERANGE; + return -BCH_ERR_ERANGE_option_too_small; } if (opt->max && v >= opt->max) { if (err) prt_printf(err, "%s: too big (max %llu)", opt->attr.name, opt->max); - return -ERANGE; + return -BCH_ERR_ERANGE_option_too_big; } if ((opt->flags & OPT_SB_FIELD_SECTORS) && (v & 511)) { |