diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-06-09 17:34:47 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-06-09 17:39:57 -0400 |
commit | 802903c8cf90f84248b31dd7776ecce148bb7b9c (patch) | |
tree | 0ec0d1e7ee7ea11ee9571c897dfa5f5562aa2bf7 /libbcachefs/super.c | |
parent | 7e570195d49389fd7119b72d5de8fb458fc82f1a (diff) |
Update bcachefs sources to a8d89eb264e0 bcachefs: Allow CONFIG_UNICODE=m
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/super.c')
-rw-r--r-- | libbcachefs/super.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libbcachefs/super.c b/libbcachefs/super.c index ae8fa58a..61ef897c 100644 --- a/libbcachefs/super.c +++ b/libbcachefs/super.c @@ -586,7 +586,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 @@ -1015,7 +1015,7 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts *opts, if (ret) goto err; -#ifdef CONFIG_UNICODE +#if IS_ENABLED(CONFIG_UNICODE) /* Default encoding until we can potentially have more as an option. */ c->cf_encoding = utf8_load(BCH_FS_DEFAULT_UTF8_ENCODING); if (IS_ERR(c->cf_encoding)) { @@ -1143,12 +1143,11 @@ int bch2_fs_start(struct bch_fs *c) print_mount_opts(c); -#ifdef CONFIG_UNICODE - bch_info(c, "Using encoding defined by superblock: utf8-%u.%u.%u", - unicode_major(BCH_FS_DEFAULT_UTF8_ENCODING), - unicode_minor(BCH_FS_DEFAULT_UTF8_ENCODING), - unicode_rev(BCH_FS_DEFAULT_UTF8_ENCODING)); -#endif + if (IS_ENABLED(CONFIG_UNICODE)) + bch_info(c, "Using encoding defined by superblock: utf8-%u.%u.%u", + unicode_major(BCH_FS_DEFAULT_UTF8_ENCODING), + unicode_minor(BCH_FS_DEFAULT_UTF8_ENCODING), + unicode_rev(BCH_FS_DEFAULT_UTF8_ENCODING)); if (!bch2_fs_may_start(c)) return bch_err_throw(c, insufficient_devices_to_start); |