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-01 00:05:06 -0400 |
commit | 3a09a4da9b53a9d59305e198fd6c4af506f2e2bb (patch) | |
tree | 0c6e3d590a37916e8007f906479ac00ed2bdfbdb | |
parent | 777bfed9e339f89d5817c455164fc691f5093ada (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 54316abe09df..1b8d8d82ee25 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; } -#ifndef CONFIG_UNICODE +#if !IS_ENABLED(CONFIG_UNICODE) if (c->sb.features & BIT_ULL(BCH_FEATURE_casefolding)) { printk(KERN_ERR "Cannot mount a filesystem with casefolding on a kernel without CONFIG_UNICODE\n"); ret = -EINVAL; |