summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/str_hash.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-05-27 19:59:59 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:03 -0400
commite47a390aa5946e3c5bea7a4a350a88d3bb3ba5b4 (patch)
tree01ca402a24c057458a13a3f97e4813bc037d2c76 /fs/bcachefs/str_hash.h
parentf154c3eb429a340d66a06e8f8d2221d28d25ab45 (diff)
downloadlinux-stable-e47a390aa5946e3c5bea7a4a350a88d3bb3ba5b4.tar.gz
linux-stable-e47a390aa5946e3c5bea7a4a350a88d3bb3ba5b4.tar.bz2
linux-stable-e47a390aa5946e3c5bea7a4a350a88d3bb3ba5b4.zip
bcachefs: Convert -ENOENT to private error codes
As with previous conversions, replace -ENOENT uses with more informative private error codes. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/str_hash.h')
-rw-r--r--fs/bcachefs/str_hash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/str_hash.h b/fs/bcachefs/str_hash.h
index 6178ae620ff1..ae21a8cca1b4 100644
--- a/fs/bcachefs/str_hash.h
+++ b/fs/bcachefs/str_hash.h
@@ -181,7 +181,7 @@ bch2_hash_lookup(struct btree_trans *trans,
}
bch2_trans_iter_exit(trans, iter);
- return ret ?: -ENOENT;
+ return ret ?: -BCH_ERR_ENOENT_str_hash_lookup;
}
static __always_inline int
@@ -288,7 +288,7 @@ found:
not_found:
if (!found && (flags & BCH_HASH_SET_MUST_REPLACE)) {
- ret = -ENOENT;
+ ret = -BCH_ERR_ENOENT_str_hash_set_must_replace;
} else if (found && (flags & BCH_HASH_SET_MUST_CREATE)) {
ret = -EEXIST;
} else {