Commit 7636752a authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] fix (UDF_FS=y && NLS=m) compile error

The patch below fixes Bugzilla #3030 ((UDF_FS=y && NLS=m) results in a
compile error).
Signed-off-by: default avatarAdrian Bunk <bunk@fs.tum.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 612f417a
...@@ -575,6 +575,11 @@ config UDF_FS ...@@ -575,6 +575,11 @@ config UDF_FS
If unsure, say N. If unsure, say N.
config UDF_NLS
bool
default y
depends on (UDF_FS=m && NLS) || (UDF_FS=y && NLS=y)
endmenu endmenu
menu "DOS/FAT/NT Filesystems" menu "DOS/FAT/NT Filesystems"
......
...@@ -417,7 +417,7 @@ udf_parse_options(char *options, struct udf_options *uopt) ...@@ -417,7 +417,7 @@ udf_parse_options(char *options, struct udf_options *uopt)
case Opt_utf8: case Opt_utf8:
uopt->flags |= (1 << UDF_FLAG_UTF8); uopt->flags |= (1 << UDF_FLAG_UTF8);
break; break;
#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE) #ifdef CONFIG_UDF_NLS
case Opt_iocharset: case Opt_iocharset:
uopt->nls_map = load_nls(args[0].from); uopt->nls_map = load_nls(args[0].from);
uopt->flags |= (1 << UDF_FLAG_NLS_MAP); uopt->flags |= (1 << UDF_FLAG_NLS_MAP);
...@@ -1518,7 +1518,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) ...@@ -1518,7 +1518,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
"utf8 cannot be combined with iocharset\n"); "utf8 cannot be combined with iocharset\n");
goto error_out; goto error_out;
} }
#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE) #ifdef CONFIG_UDF_NLS
if ((uopt.flags & (1 << UDF_FLAG_NLS_MAP)) && !uopt.nls_map) if ((uopt.flags & (1 << UDF_FLAG_NLS_MAP)) && !uopt.nls_map)
{ {
uopt.nls_map = load_nls_default(); uopt.nls_map = load_nls_default();
...@@ -1668,7 +1668,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) ...@@ -1668,7 +1668,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]); udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]);
} }
} }
#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE) #ifdef CONFIG_UDF_NLS
if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP))
unload_nls(UDF_SB(sb)->s_nls_map); unload_nls(UDF_SB(sb)->s_nls_map);
#endif #endif
...@@ -1746,7 +1746,7 @@ udf_put_super(struct super_block *sb) ...@@ -1746,7 +1746,7 @@ udf_put_super(struct super_block *sb)
udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]); udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]);
} }
} }
#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE) #ifdef CONFIG_UDF_NLS
if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP))
unload_nls(UDF_SB(sb)->s_nls_map); unload_nls(UDF_SB(sb)->s_nls_map);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment