Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Jan Kara <jack@suse.cz>

Jan Kara 63bceed8 cecb1f06

+3
+3
fs/udf/inode.c
··· 416 416 int err; 417 417 struct udf_inode_info *iinfo = UDF_I(inode); 418 418 419 + if (WARN_ON_ONCE(iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB)) 420 + return -EFSCORRUPTED; 421 + 419 422 map->oflags = 0; 420 423 if (!(map->iflags & UDF_MAP_CREATE)) { 421 424 struct kernel_lb_addr eloc;