Skip to content

Commit fdf2657

Browse files
elfringjankara
authored andcommitted
udf: One function call less in udf_fill_super() after error detection
The iput() function was called in up to three cases by the udf_fill_super() function during error handling even if the passed data structure element contained still a null pointer. This implementation detail could be improved by the introduction of another jump label. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Jan Kara <jack@suse.cz>
1 parent 0d454e4 commit fdf2657

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/udf/super.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,12 +2082,12 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
20822082
mutex_init(&sbi->s_alloc_mutex);
20832083

20842084
if (!udf_parse_options((char *)options, &uopt, false))
2085-
goto error_out;
2085+
goto parse_options_failure;
20862086

20872087
if (uopt.flags & (1 << UDF_FLAG_UTF8) &&
20882088
uopt.flags & (1 << UDF_FLAG_NLS_MAP)) {
20892089
udf_err(sb, "utf8 cannot be combined with iocharset\n");
2090-
goto error_out;
2090+
goto parse_options_failure;
20912091
}
20922092
#ifdef CONFIG_UDF_NLS
20932093
if ((uopt.flags & (1 << UDF_FLAG_NLS_MAP)) && !uopt.nls_map) {
@@ -2238,6 +2238,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
22382238

22392239
error_out:
22402240
iput(sbi->s_vat_inode);
2241+
parse_options_failure:
22412242
#ifdef CONFIG_UDF_NLS
22422243
if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP))
22432244
unload_nls(sbi->s_nls_map);

0 commit comments

Comments
 (0)