From b8333ea1adf08c5ccc3790403f0d1053e1b49f62 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Wed, 11 Apr 2018 12:27:27 +0200 Subject: 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 --- fs/udf/super.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'fs/udf/super.c') diff --git a/fs/udf/super.c b/fs/udf/super.c index 7949c338efa5..37d2565a7f78 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -572,7 +572,6 @@ static int udf_parse_options(char *options, struct udf_options *uopt, case Opt_utf8: uopt->flags |= (1 << UDF_FLAG_UTF8); break; -#ifdef CONFIG_UDF_NLS case Opt_iocharset: if (!remount) { if (uopt->nls_map) @@ -581,7 +580,6 @@ static int udf_parse_options(char *options, struct udf_options *uopt, uopt->flags |= (1 << UDF_FLAG_NLS_MAP); } break; -#endif case Opt_uforget: uopt->flags |= (1 << UDF_FLAG_UID_FORGET); break; @@ -2117,7 +2115,6 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) udf_err(sb, "utf8 cannot be combined with iocharset\n"); goto parse_options_failure; } -#ifdef CONFIG_UDF_NLS if ((uopt.flags & (1 << UDF_FLAG_NLS_MAP)) && !uopt.nls_map) { uopt.nls_map = load_nls_default(); if (!uopt.nls_map) @@ -2125,7 +2122,6 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) else udf_debug("Using default NLS map\n"); } -#endif if (!(uopt.flags & (1 << UDF_FLAG_NLS_MAP))) uopt.flags |= (1 << UDF_FLAG_UTF8); @@ -2279,10 +2275,8 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) error_out: iput(sbi->s_vat_inode); parse_options_failure: -#ifdef CONFIG_UDF_NLS if (uopt.nls_map) unload_nls(uopt.nls_map); -#endif if (lvid_open) udf_close_lvid(sb); brelse(sbi->s_lvid_bh); @@ -2332,10 +2326,8 @@ static void udf_put_super(struct super_block *sb) sbi = UDF_SB(sb); iput(sbi->s_vat_inode); -#ifdef CONFIG_UDF_NLS if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) unload_nls(sbi->s_nls_map); -#endif if (!sb_rdonly(sb)) udf_close_lvid(sb); brelse(sbi->s_lvid_bh); -- cgit v1.2.3