Commit 63bceed8 authored by Jan Kara's avatar Jan Kara

udf: Warn if block mapping is done for in-ICB files

Now that address space operations are merge dfor in-ICB and normal
files, it is more likely some code mistakenly tries to map blocks for
in-ICB files. WARN and return error instead of silently returning
garbage.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent cecb1f06
...@@ -416,6 +416,9 @@ static int udf_map_block(struct inode *inode, struct udf_map_rq *map) ...@@ -416,6 +416,9 @@ static int udf_map_block(struct inode *inode, struct udf_map_rq *map)
int err; int err;
struct udf_inode_info *iinfo = UDF_I(inode); struct udf_inode_info *iinfo = UDF_I(inode);
if (WARN_ON_ONCE(iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB))
return -EFSCORRUPTED;
map->oflags = 0; map->oflags = 0;
if (!(map->iflags & UDF_MAP_CREATE)) { if (!(map->iflags & UDF_MAP_CREATE)) {
struct kernel_lb_addr eloc; struct kernel_lb_addr eloc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment