Skip to content

Commit 630c128

Browse files
committed
Merge tag 'unicode-for-next-5.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode
Pull unicode cleanup from Gabriel Krisman Bertazi: "A fix from Christoph Hellwig merging the CONFIG_UNICODE_UTF8_DATA into the previous CONFIG_UNICODE. It is -rc material since we don't want to expose the former symbol on 5.17. This has been living on linux-next for the past week" * tag 'unicode-for-next-5.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode: unicode: clean up the Kconfig symbol confusion
2 parents 61fda95 + 5298d4b commit 630c128

File tree

17 files changed

+60
-66
lines changed

17 files changed

+60
-66
lines changed

fs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ obj-$(CONFIG_EXPORTFS) += exportfs/
9696
obj-$(CONFIG_NFSD) += nfsd/
9797
obj-$(CONFIG_LOCKD) += lockd/
9898
obj-$(CONFIG_NLS) += nls/
99-
obj-$(CONFIG_UNICODE) += unicode/
99+
obj-y += unicode/
100100
obj-$(CONFIG_SYSV_FS) += sysv/
101101
obj-$(CONFIG_SMBFS_COMMON) += smbfs_common/
102102
obj-$(CONFIG_CIFS) += cifs/

fs/ext4/ext4.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,7 +2485,7 @@ struct ext4_filename {
24852485
#ifdef CONFIG_FS_ENCRYPTION
24862486
struct fscrypt_str crypto_buf;
24872487
#endif
2488-
#ifdef CONFIG_UNICODE
2488+
#if IS_ENABLED(CONFIG_UNICODE)
24892489
struct fscrypt_str cf_name;
24902490
#endif
24912491
};
@@ -2721,7 +2721,7 @@ extern unsigned ext4_free_clusters_after_init(struct super_block *sb,
27212721
struct ext4_group_desc *gdp);
27222722
ext4_fsblk_t ext4_inode_to_goal_block(struct inode *);
27232723

2724-
#ifdef CONFIG_UNICODE
2724+
#if IS_ENABLED(CONFIG_UNICODE)
27252725
extern int ext4_fname_setup_ci_filename(struct inode *dir,
27262726
const struct qstr *iname,
27272727
struct ext4_filename *fname);
@@ -2754,7 +2754,7 @@ static inline int ext4_fname_setup_filename(struct inode *dir,
27542754

27552755
ext4_fname_from_fscrypt_name(fname, &name);
27562756

2757-
#ifdef CONFIG_UNICODE
2757+
#if IS_ENABLED(CONFIG_UNICODE)
27582758
err = ext4_fname_setup_ci_filename(dir, iname, fname);
27592759
#endif
27602760
return err;
@@ -2773,7 +2773,7 @@ static inline int ext4_fname_prepare_lookup(struct inode *dir,
27732773

27742774
ext4_fname_from_fscrypt_name(fname, &name);
27752775

2776-
#ifdef CONFIG_UNICODE
2776+
#if IS_ENABLED(CONFIG_UNICODE)
27772777
err = ext4_fname_setup_ci_filename(dir, &dentry->d_name, fname);
27782778
#endif
27792779
return err;
@@ -2790,7 +2790,7 @@ static inline void ext4_fname_free_filename(struct ext4_filename *fname)
27902790
fname->usr_fname = NULL;
27912791
fname->disk_name.name = NULL;
27922792

2793-
#ifdef CONFIG_UNICODE
2793+
#if IS_ENABLED(CONFIG_UNICODE)
27942794
kfree(fname->cf_name.name);
27952795
fname->cf_name.name = NULL;
27962796
#endif
@@ -2806,7 +2806,7 @@ static inline int ext4_fname_setup_filename(struct inode *dir,
28062806
fname->disk_name.name = (unsigned char *) iname->name;
28072807
fname->disk_name.len = iname->len;
28082808

2809-
#ifdef CONFIG_UNICODE
2809+
#if IS_ENABLED(CONFIG_UNICODE)
28102810
err = ext4_fname_setup_ci_filename(dir, iname, fname);
28112811
#endif
28122812

@@ -2822,7 +2822,7 @@ static inline int ext4_fname_prepare_lookup(struct inode *dir,
28222822

28232823
static inline void ext4_fname_free_filename(struct ext4_filename *fname)
28242824
{
2825-
#ifdef CONFIG_UNICODE
2825+
#if IS_ENABLED(CONFIG_UNICODE)
28262826
kfree(fname->cf_name.name);
28272827
fname->cf_name.name = NULL;
28282828
#endif

fs/ext4/hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static int __ext4fs_dirhash(const struct inode *dir, const char *name, int len,
290290
int ext4fs_dirhash(const struct inode *dir, const char *name, int len,
291291
struct dx_hash_info *hinfo)
292292
{
293-
#ifdef CONFIG_UNICODE
293+
#if IS_ENABLED(CONFIG_UNICODE)
294294
const struct unicode_map *um = dir->i_sb->s_encoding;
295295
int r, dlen;
296296
unsigned char *buff;

fs/ext4/namei.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ static void dx_insert_block(struct dx_frame *frame, u32 hash, ext4_lblk_t block)
13171317
dx_set_count(entries, count + 1);
13181318
}
13191319

1320-
#ifdef CONFIG_UNICODE
1320+
#if IS_ENABLED(CONFIG_UNICODE)
13211321
/*
13221322
* Test whether a case-insensitive directory entry matches the filename
13231323
* being searched for. If quick is set, assume the name being looked up
@@ -1428,7 +1428,7 @@ static bool ext4_match(struct inode *parent,
14281428
f.crypto_buf = fname->crypto_buf;
14291429
#endif
14301430

1431-
#ifdef CONFIG_UNICODE
1431+
#if IS_ENABLED(CONFIG_UNICODE)
14321432
if (parent->i_sb->s_encoding && IS_CASEFOLDED(parent) &&
14331433
(!IS_ENCRYPTED(parent) || fscrypt_has_encryption_key(parent))) {
14341434
if (fname->cf_name.name) {
@@ -1800,7 +1800,7 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsi
18001800
}
18011801
}
18021802

1803-
#ifdef CONFIG_UNICODE
1803+
#if IS_ENABLED(CONFIG_UNICODE)
18041804
if (!inode && IS_CASEFOLDED(dir)) {
18051805
/* Eventually we want to call d_add_ci(dentry, NULL)
18061806
* for negative dentries in the encoding case as
@@ -2308,7 +2308,7 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry,
23082308
if (fscrypt_is_nokey_name(dentry))
23092309
return -ENOKEY;
23102310

2311-
#ifdef CONFIG_UNICODE
2311+
#if IS_ENABLED(CONFIG_UNICODE)
23122312
if (sb_has_strict_encoding(sb) && IS_CASEFOLDED(dir) &&
23132313
sb->s_encoding && utf8_validate(sb->s_encoding, &dentry->d_name))
23142314
return -EINVAL;
@@ -3126,7 +3126,7 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry)
31263126
ext4_fc_track_unlink(handle, dentry);
31273127
retval = ext4_mark_inode_dirty(handle, dir);
31283128

3129-
#ifdef CONFIG_UNICODE
3129+
#if IS_ENABLED(CONFIG_UNICODE)
31303130
/* VFS negative dentries are incompatible with Encoding and
31313131
* Case-insensitiveness. Eventually we'll want avoid
31323132
* invalidating the dentries here, alongside with returning the
@@ -3231,7 +3231,7 @@ static int ext4_unlink(struct inode *dir, struct dentry *dentry)
32313231
retval = __ext4_unlink(handle, dir, &dentry->d_name, d_inode(dentry));
32323232
if (!retval)
32333233
ext4_fc_track_unlink(handle, dentry);
3234-
#ifdef CONFIG_UNICODE
3234+
#if IS_ENABLED(CONFIG_UNICODE)
32353235
/* VFS negative dentries are incompatible with Encoding and
32363236
* Case-insensitiveness. Eventually we'll want avoid
32373237
* invalidating the dentries here, alongside with returning the

fs/ext4/super.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@ static void ext4_put_super(struct super_block *sb)
13011301
kfree(sbi->s_blockgroup_lock);
13021302
fs_put_dax(sbi->s_daxdev);
13031303
fscrypt_free_dummy_policy(&sbi->s_dummy_enc_policy);
1304-
#ifdef CONFIG_UNICODE
1304+
#if IS_ENABLED(CONFIG_UNICODE)
13051305
utf8_unload(sb->s_encoding);
13061306
#endif
13071307
kfree(sbi);
@@ -1961,7 +1961,7 @@ static const struct mount_opts {
19611961
{Opt_err, 0, 0}
19621962
};
19631963

1964-
#ifdef CONFIG_UNICODE
1964+
#if IS_ENABLED(CONFIG_UNICODE)
19651965
static const struct ext4_sb_encodings {
19661966
__u16 magic;
19671967
char *name;
@@ -3606,7 +3606,7 @@ int ext4_feature_set_ok(struct super_block *sb, int readonly)
36063606
return 0;
36073607
}
36083608

3609-
#ifndef CONFIG_UNICODE
3609+
#if !IS_ENABLED(CONFIG_UNICODE)
36103610
if (ext4_has_feature_casefold(sb)) {
36113611
ext4_msg(sb, KERN_ERR,
36123612
"Filesystem with casefold feature cannot be "
@@ -4610,7 +4610,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
46104610
if (err < 0)
46114611
goto failed_mount;
46124612

4613-
#ifdef CONFIG_UNICODE
4613+
#if IS_ENABLED(CONFIG_UNICODE)
46144614
if (ext4_has_feature_casefold(sb) && !sb->s_encoding) {
46154615
const struct ext4_sb_encodings *encoding_info;
46164616
struct unicode_map *encoding;
@@ -5514,7 +5514,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
55145514
if (sbi->s_chksum_driver)
55155515
crypto_free_shash(sbi->s_chksum_driver);
55165516

5517-
#ifdef CONFIG_UNICODE
5517+
#if IS_ENABLED(CONFIG_UNICODE)
55185518
utf8_unload(sb->s_encoding);
55195519
#endif
55205520

fs/ext4/sysfs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,15 @@ EXT4_ATTR_FEATURE(meta_bg_resize);
309309
EXT4_ATTR_FEATURE(encryption);
310310
EXT4_ATTR_FEATURE(test_dummy_encryption_v2);
311311
#endif
312-
#ifdef CONFIG_UNICODE
312+
#if IS_ENABLED(CONFIG_UNICODE)
313313
EXT4_ATTR_FEATURE(casefold);
314314
#endif
315315
#ifdef CONFIG_FS_VERITY
316316
EXT4_ATTR_FEATURE(verity);
317317
#endif
318318
EXT4_ATTR_FEATURE(metadata_csum_seed);
319319
EXT4_ATTR_FEATURE(fast_commit);
320-
#if defined(CONFIG_UNICODE) && defined(CONFIG_FS_ENCRYPTION)
320+
#if IS_ENABLED(CONFIG_UNICODE) && defined(CONFIG_FS_ENCRYPTION)
321321
EXT4_ATTR_FEATURE(encrypted_casefold);
322322
#endif
323323

@@ -329,15 +329,15 @@ static struct attribute *ext4_feat_attrs[] = {
329329
ATTR_LIST(encryption),
330330
ATTR_LIST(test_dummy_encryption_v2),
331331
#endif
332-
#ifdef CONFIG_UNICODE
332+
#if IS_ENABLED(CONFIG_UNICODE)
333333
ATTR_LIST(casefold),
334334
#endif
335335
#ifdef CONFIG_FS_VERITY
336336
ATTR_LIST(verity),
337337
#endif
338338
ATTR_LIST(metadata_csum_seed),
339339
ATTR_LIST(fast_commit),
340-
#if defined(CONFIG_UNICODE) && defined(CONFIG_FS_ENCRYPTION)
340+
#if IS_ENABLED(CONFIG_UNICODE) && defined(CONFIG_FS_ENCRYPTION)
341341
ATTR_LIST(encrypted_casefold),
342342
#endif
343343
NULL,

fs/f2fs/dir.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "xattr.h"
1717
#include <trace/events/f2fs.h>
1818

19-
#ifdef CONFIG_UNICODE
19+
#if IS_ENABLED(CONFIG_UNICODE)
2020
extern struct kmem_cache *f2fs_cf_name_slab;
2121
#endif
2222

@@ -79,7 +79,7 @@ unsigned char f2fs_get_de_type(struct f2fs_dir_entry *de)
7979
int f2fs_init_casefolded_name(const struct inode *dir,
8080
struct f2fs_filename *fname)
8181
{
82-
#ifdef CONFIG_UNICODE
82+
#if IS_ENABLED(CONFIG_UNICODE)
8383
struct super_block *sb = dir->i_sb;
8484

8585
if (IS_CASEFOLDED(dir)) {
@@ -174,7 +174,7 @@ void f2fs_free_filename(struct f2fs_filename *fname)
174174
kfree(fname->crypto_buf.name);
175175
fname->crypto_buf.name = NULL;
176176
#endif
177-
#ifdef CONFIG_UNICODE
177+
#if IS_ENABLED(CONFIG_UNICODE)
178178
if (fname->cf_name.name) {
179179
kmem_cache_free(f2fs_cf_name_slab, fname->cf_name.name);
180180
fname->cf_name.name = NULL;
@@ -208,7 +208,7 @@ static struct f2fs_dir_entry *find_in_block(struct inode *dir,
208208
return f2fs_find_target_dentry(&d, fname, max_slots);
209209
}
210210

211-
#ifdef CONFIG_UNICODE
211+
#if IS_ENABLED(CONFIG_UNICODE)
212212
/*
213213
* Test whether a case-insensitive directory entry matches the filename
214214
* being searched for.
@@ -266,7 +266,7 @@ static inline int f2fs_match_name(const struct inode *dir,
266266
{
267267
struct fscrypt_name f;
268268

269-
#ifdef CONFIG_UNICODE
269+
#if IS_ENABLED(CONFIG_UNICODE)
270270
if (fname->cf_name.name) {
271271
struct qstr cf = FSTR_TO_QSTR(&fname->cf_name);
272272

fs/f2fs/f2fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ struct f2fs_filename {
488488
*/
489489
struct fscrypt_str crypto_buf;
490490
#endif
491-
#ifdef CONFIG_UNICODE
491+
#if IS_ENABLED(CONFIG_UNICODE)
492492
/*
493493
* For casefolded directories: the casefolded name, but it's left NULL
494494
* if the original name is not valid Unicode, if the directory is both

fs/f2fs/hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void f2fs_hash_filename(const struct inode *dir, struct f2fs_filename *fname)
105105
return;
106106
}
107107

108-
#ifdef CONFIG_UNICODE
108+
#if IS_ENABLED(CONFIG_UNICODE)
109109
if (IS_CASEFOLDED(dir)) {
110110
/*
111111
* If the casefolded name is provided, hash it instead of the

fs/f2fs/namei.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
561561
goto out_iput;
562562
}
563563
out_splice:
564-
#ifdef CONFIG_UNICODE
564+
#if IS_ENABLED(CONFIG_UNICODE)
565565
if (!inode && IS_CASEFOLDED(dir)) {
566566
/* Eventually we want to call d_add_ci(dentry, NULL)
567567
* for negative dentries in the encoding case as
@@ -622,7 +622,7 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
622622
goto fail;
623623
}
624624
f2fs_delete_entry(de, page, dir, inode);
625-
#ifdef CONFIG_UNICODE
625+
#if IS_ENABLED(CONFIG_UNICODE)
626626
/* VFS negative dentries are incompatible with Encoding and
627627
* Case-insensitiveness. Eventually we'll want avoid
628628
* invalidating the dentries here, alongside with returning the

0 commit comments

Comments
 (0)