udf: Fix bug in VAT mapping code
Fix mapping of blocks using VAT when it is stored in an inode.
UDF_I(inode)->i_data already points to the beginning of VAT header so there's
no need to add udf_ext0_offset(inode).
Signed-off-by: Sebastian Manciulea <manciuleas@yahoo.com>
Signed-off-by: Jan Kara <jack@suse.cz>
diff --git a/fs/udf/partition.c b/fs/udf/partition.c
index 2dfe4be..63610f0 100644
--- a/fs/udf/partition.c
+++ b/fs/udf/partition.c
@@ -66,7 +66,8 @@
}
if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) {
- loc = le32_to_cpu(((__le32 *)iinfo->i_ext.i_data)[block]);
+ loc = le32_to_cpu(((__le32 *)(iinfo->i_ext.i_data +
+ vdata->s_start_offset))[block]);
goto translate;
}
index = (sb->s_blocksize - vdata->s_start_offset) / sizeof(uint32_t);