Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

udf: Always require NLS support

UDF needs to convert strings between OSTA CS0 charset and standard UTF8.
Currently we implement our own utf-16 <-> utf-8 translations which is
unnecessary code duplication. Always select NLS so that we can use
translation functions from there.

Signed-off-by: Jan Kara <jack@suse.cz>

Jan Kara b8333ea1 44f06ba8

+1 -13
+1 -5
fs/udf/Kconfig
··· 1 1 config UDF_FS 2 2 tristate "UDF file system support" 3 3 select CRC_ITU_T 4 + select NLS 4 5 help 5 6 This is a file system used on some CD-ROMs and DVDs. Since the 6 7 file system is supported by multiple operating systems and is more ··· 14 13 module will be called udf. 15 14 16 15 If unsure, say N. 17 - 18 - config UDF_NLS 19 - bool 20 - default y 21 - depends on (UDF_FS=m && NLS) || (UDF_FS=y && NLS=y)
-8
fs/udf/super.c
··· 572 572 case Opt_utf8: 573 573 uopt->flags |= (1 << UDF_FLAG_UTF8); 574 574 break; 575 - #ifdef CONFIG_UDF_NLS 576 575 case Opt_iocharset: 577 576 if (!remount) { 578 577 if (uopt->nls_map) ··· 580 581 uopt->flags |= (1 << UDF_FLAG_NLS_MAP); 581 582 } 582 583 break; 583 - #endif 584 584 case Opt_uforget: 585 585 uopt->flags |= (1 << UDF_FLAG_UID_FORGET); 586 586 break; ··· 2115 2117 udf_err(sb, "utf8 cannot be combined with iocharset\n"); 2116 2118 goto parse_options_failure; 2117 2119 } 2118 - #ifdef CONFIG_UDF_NLS 2119 2120 if ((uopt.flags & (1 << UDF_FLAG_NLS_MAP)) && !uopt.nls_map) { 2120 2121 uopt.nls_map = load_nls_default(); 2121 2122 if (!uopt.nls_map) ··· 2122 2125 else 2123 2126 udf_debug("Using default NLS map\n"); 2124 2127 } 2125 - #endif 2126 2128 if (!(uopt.flags & (1 << UDF_FLAG_NLS_MAP))) 2127 2129 uopt.flags |= (1 << UDF_FLAG_UTF8); 2128 2130 ··· 2275 2279 error_out: 2276 2280 iput(sbi->s_vat_inode); 2277 2281 parse_options_failure: 2278 - #ifdef CONFIG_UDF_NLS 2279 2282 if (uopt.nls_map) 2280 2283 unload_nls(uopt.nls_map); 2281 - #endif 2282 2284 if (lvid_open) 2283 2285 udf_close_lvid(sb); 2284 2286 brelse(sbi->s_lvid_bh); ··· 2326 2332 sbi = UDF_SB(sb); 2327 2333 2328 2334 iput(sbi->s_vat_inode); 2329 - #ifdef CONFIG_UDF_NLS 2330 2335 if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) 2331 2336 unload_nls(sbi->s_nls_map); 2332 - #endif 2333 2337 if (!sb_rdonly(sb)) 2334 2338 udf_close_lvid(sb); 2335 2339 brelse(sbi->s_lvid_bh);