diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-06-03 15:53:44 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-07-03 01:20:17 -0400 |
commit | d52f8a0be7e7d92e57bc725fdcb024f57fe2dcd5 (patch) | |
tree | 9f9b0b555eab0b13ab646b92d66cff1310e358f8 | |
parent | 58e1fa32b4818fe3ef53f1b9f904d6c73ad02108 (diff) |
bcachefs: Allow CONFIG_UNICODE=m
Fix the CONFIG_UNICODE checks - IS_ENABLED() is required when unicode is
bulit as a module.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/bcachefs.h | 2 | ||||
-rw-r--r-- | fs/bcachefs/fs.c | 2 | ||||
-rw-r--r-- | fs/bcachefs/inode.c | 2 | ||||
-rw-r--r-- | fs/bcachefs/super.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index ddfacad0f70c..f4edbe2a14fd 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -1285,7 +1285,7 @@ static inline bool bch2_discard_opt_enabled(struct bch_fs *c, struct bch_dev *ca static inline bool bch2_fs_casefold_enabled(struct bch_fs *c) { -#ifdef CONFIG_UNICODE +#if IS_ENABLED(CONFIG_UNICODE) return !c->opts.casefold_disabled; #else return false; diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index e54e4f255b22..cd8347063e80 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -2563,7 +2563,7 @@ got_sb: sb->s_shrink->seeks = 0; -#ifdef CONFIG_UNICODE +#if IS_ENABLED(CONFIG_UNICODE) if (bch2_fs_casefold_enabled(c)) sb->s_encoding = c->cf_encoding; generic_set_sb_d_ops(sb); diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index ef4cc7395b86..6e08c7a26f4d 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -1265,7 +1265,7 @@ int bch2_inode_set_casefold(struct btree_trans *trans, subvol_inum inum, { struct bch_fs *c = trans->c; -#ifndef CONFIG_UNICODE +#if !IS_ENABLED(CONFIG_UNICODE) bch_err(c, "Cannot use casefolding on a kernel without CONFIG_UNICODE"); return -EOPNOTSUPP; #endif diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index c46b1053a02c..5e90f64bd5f4 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -585,7 +585,7 @@ static void __bch2_fs_free(struct bch_fs *c) for (unsigned i = 0; i < BCH_TIME_STAT_NR; i++) bch2_time_stats_exit(&c->times[i]); -#ifdef CONFIG_UNICODE +#if IS_ENABLED(CONFIG_UNICODE) utf8_unload(c->cf_encoding); #endif @@ -1024,7 +1024,7 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts *opts, goto err; } -#ifdef CONFIG_UNICODE +#if IS_ENABLED(CONFIG_UNICODE) if (bch2_fs_casefold_enabled(c)) { /* Default encoding until we can potentially have more as an option. */ c->cf_encoding = utf8_load(BCH_FS_DEFAULT_UTF8_ENCODING); |