From: Jan Kara Date: Tue, 24 Jan 2023 11:16:38 +0000 (+0100) Subject: udf: Add handling of in-ICB files to udf_bmap() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=907c6c2ffa6a6d28f59db22ac0686ca3103c61d8;p=users%2Fjedix%2Flinux-maple.git udf: Add handling of in-ICB files to udf_bmap() Add detection of in-ICB files to udf_bmap() and return error in that case. This will allow us o use single address_space_operations in UDF. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 094ac6f22c72e..c65a5d76d15a2 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -296,6 +296,10 @@ ssize_t udf_direct_IO(struct kiocb *iocb, struct iov_iter *iter) static sector_t udf_bmap(struct address_space *mapping, sector_t block) { + struct udf_inode_info *iinfo = UDF_I(mapping->host); + + if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) + return -EINVAL; return generic_block_bmap(mapping, block, udf_get_block); }