diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
commit | af52739b922f656eb1f39016fabaabe4baeda2e2 (patch) | |
tree | 79a7aa810d0493cd0cf4adebac26d37f12e8b545 /fs/udf/partition.c | |
parent | 25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff) | |
parent | 33688abb2802ff3a230bd2441f765477b94cc89e (diff) |
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in
drivers/iio/industrialio-trigger.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/udf/partition.c')
-rw-r--r-- | fs/udf/partition.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/udf/partition.c b/fs/udf/partition.c index 5f861ed287c3..888c364b2fe9 100644 --- a/fs/udf/partition.c +++ b/fs/udf/partition.c | |||
@@ -295,7 +295,8 @@ static uint32_t udf_try_read_meta(struct inode *inode, uint32_t block, | |||
295 | map = &UDF_SB(sb)->s_partmaps[partition]; | 295 | map = &UDF_SB(sb)->s_partmaps[partition]; |
296 | /* map to sparable/physical partition desc */ | 296 | /* map to sparable/physical partition desc */ |
297 | phyblock = udf_get_pblock(sb, eloc.logicalBlockNum, | 297 | phyblock = udf_get_pblock(sb, eloc.logicalBlockNum, |
298 | map->s_partition_num, ext_offset + offset); | 298 | map->s_type_specific.s_metadata.s_phys_partition_ref, |
299 | ext_offset + offset); | ||
299 | } | 300 | } |
300 | 301 | ||
301 | brelse(epos.bh); | 302 | brelse(epos.bh); |
@@ -317,14 +318,18 @@ uint32_t udf_get_pblock_meta25(struct super_block *sb, uint32_t block, | |||
317 | mdata = &map->s_type_specific.s_metadata; | 318 | mdata = &map->s_type_specific.s_metadata; |
318 | inode = mdata->s_metadata_fe ? : mdata->s_mirror_fe; | 319 | inode = mdata->s_metadata_fe ? : mdata->s_mirror_fe; |
319 | 320 | ||
320 | /* We shouldn't mount such media... */ | 321 | if (!inode) |
321 | BUG_ON(!inode); | 322 | return 0xFFFFFFFF; |
323 | |||
322 | retblk = udf_try_read_meta(inode, block, partition, offset); | 324 | retblk = udf_try_read_meta(inode, block, partition, offset); |
323 | if (retblk == 0xFFFFFFFF && mdata->s_metadata_fe) { | 325 | if (retblk == 0xFFFFFFFF && mdata->s_metadata_fe) { |
324 | udf_warn(sb, "error reading from METADATA, trying to read from MIRROR\n"); | 326 | udf_warn(sb, "error reading from METADATA, trying to read from MIRROR\n"); |
325 | if (!(mdata->s_flags & MF_MIRROR_FE_LOADED)) { | 327 | if (!(mdata->s_flags & MF_MIRROR_FE_LOADED)) { |
326 | mdata->s_mirror_fe = udf_find_metadata_inode_efe(sb, | 328 | mdata->s_mirror_fe = udf_find_metadata_inode_efe(sb, |
327 | mdata->s_mirror_file_loc, map->s_partition_num); | 329 | mdata->s_mirror_file_loc, |
330 | mdata->s_phys_partition_ref); | ||
331 | if (IS_ERR(mdata->s_mirror_fe)) | ||
332 | mdata->s_mirror_fe = NULL; | ||
328 | mdata->s_flags |= MF_MIRROR_FE_LOADED; | 333 | mdata->s_flags |= MF_MIRROR_FE_LOADED; |
329 | } | 334 | } |
330 | 335 | ||