mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
udf: Silence warning about accesses beyond end of device
Some of the computed positions of anchor block could be beyond the end of device. Skip reading such blocks. Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
5fb28aa25a
commit
4f7874c868
1 changed files with 5 additions and 1 deletions
|
@ -688,8 +688,12 @@ static int udf_check_anchor_block(struct super_block *sb, sector_t block,
|
|||
uint16_t ident;
|
||||
uint32_t location;
|
||||
|
||||
if (varconv)
|
||||
if (varconv) {
|
||||
if (udf_fixed_to_variable(block) >=
|
||||
sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits)
|
||||
return 0;
|
||||
bh = sb_bread(sb, udf_fixed_to_variable(block));
|
||||
}
|
||||
else
|
||||
bh = sb_bread(sb, block);
|
||||
|
||||
|
|
Loading…
Reference in a new issue