]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bcachefs: Fix bch2_maybe_casefold() when CONFIG_UTF8=n
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 16 Jul 2025 21:31:31 +0000 (17:31 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 16 Jul 2025 21:32:33 +0000 (17:32 -0400)
maybe_casefold() shouldn't have been nooped, just bch2_casefold().

Fixes: 94426e4201fb ("bcachefs: opts.casefold_disabled")
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/dirent.h

index 2e9cbf8123c4e9bd04a5c7dad6372b2f94de198a..0417608c18d578c7e6891c20d577e7a7e07d14d6 100644 (file)
@@ -26,6 +26,13 @@ struct bch_inode_info;
 #ifdef CONFIG_UNICODE
 int bch2_casefold(struct btree_trans *, const struct bch_hash_info *,
                  const struct qstr *, struct qstr *);
+#else
+static inline int bch2_casefold(struct btree_trans *trans, const struct bch_hash_info *info,
+                               const struct qstr *str, struct qstr *out_cf)
+{
+       return -EOPNOTSUPP;
+}
+#endif
 
 static inline int bch2_maybe_casefold(struct btree_trans *trans,
                                      const struct bch_hash_info *info,
@@ -38,14 +45,6 @@ static inline int bch2_maybe_casefold(struct btree_trans *trans,
                return bch2_casefold(trans, info, str, out_cf);
        }
 }
-#else
-static inline int bch2_maybe_casefold(struct btree_trans *trans,
-                                     const struct bch_hash_info *info,
-                                     const struct qstr *str, struct qstr *out_cf)
-{
-       return -EOPNOTSUPP;
-}
-#endif
 
 struct qstr bch2_dirent_get_name(struct bkey_s_c_dirent);