summaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r--fs/udf/super.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index b96f190bc567..81155b9b445b 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -2070,6 +2070,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
2070 struct udf_options uopt; 2070 struct udf_options uopt;
2071 struct kernel_lb_addr rootdir, fileset; 2071 struct kernel_lb_addr rootdir, fileset;
2072 struct udf_sb_info *sbi; 2072 struct udf_sb_info *sbi;
2073 bool lvid_open = false;
2073 2074
2074 uopt.flags = (1 << UDF_FLAG_USE_AD_IN_ICB) | (1 << UDF_FLAG_STRICT); 2075 uopt.flags = (1 << UDF_FLAG_USE_AD_IN_ICB) | (1 << UDF_FLAG_STRICT);
2075 uopt.uid = INVALID_UID; 2076 uopt.uid = INVALID_UID;
@@ -2216,8 +2217,10 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
2216 le16_to_cpu(ts.year), ts.month, ts.day, 2217 le16_to_cpu(ts.year), ts.month, ts.day,
2217 ts.hour, ts.minute, le16_to_cpu(ts.typeAndTimezone)); 2218 ts.hour, ts.minute, le16_to_cpu(ts.typeAndTimezone));
2218 } 2219 }
2219 if (!(sb->s_flags & MS_RDONLY)) 2220 if (!(sb->s_flags & MS_RDONLY)) {
2220 udf_open_lvid(sb); 2221 udf_open_lvid(sb);
2222 lvid_open = true;
2223 }
2221 2224
2222 /* Assign the root inode */ 2225 /* Assign the root inode */
2223 /* assign inodes by physical block number */ 2226 /* assign inodes by physical block number */
@@ -2248,7 +2251,7 @@ parse_options_failure:
2248 if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP)) 2251 if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP))
2249 unload_nls(sbi->s_nls_map); 2252 unload_nls(sbi->s_nls_map);
2250#endif 2253#endif
2251 if (!(sb->s_flags & MS_RDONLY)) 2254 if (lvid_open)
2252 udf_close_lvid(sb); 2255 udf_close_lvid(sb);
2253 brelse(sbi->s_lvid_bh); 2256 brelse(sbi->s_lvid_bh);
2254 udf_sb_free_partitions(sb); 2257 udf_sb_free_partitions(sb);