mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
udf: Don't BUG on missing metadata partition descriptor
Currently, if a metadata partition map is missing its partition descriptor, then udf_get_pblock_meta25() will BUG() out the first time it is called. This is rather drastic for a corrupted filesystem, so just treat this case as an invalid mapping instead. Signed-off-by: Alden Tondettar <[email protected]> Signed-off-by: Jan Kara <[email protected]>
This commit is contained in:
parent
2600a46ee0
commit
585d70006f
1 changed files with 3 additions and 2 deletions
|
|
@ -317,8 +317,9 @@ uint32_t udf_get_pblock_meta25(struct super_block *sb, uint32_t block,
|
|||
mdata = &map->s_type_specific.s_metadata;
|
||||
inode = mdata->s_metadata_fe ? : mdata->s_mirror_fe;
|
||||
|
||||
/* We shouldn't mount such media... */
|
||||
BUG_ON(!inode);
|
||||
if (!inode)
|
||||
return 0xFFFFFFFF;
|
||||
|
||||
retblk = udf_try_read_meta(inode, block, partition, offset);
|
||||
if (retblk == 0xFFFFFFFF && mdata->s_metadata_fe) {
|
||||
udf_warn(sb, "error reading from METADATA, trying to read from MIRROR\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue