Message ID | 20230124120628.24449-6-jack@suse.cz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | udf: Unify aops | expand |
On Tue, Jan 24, 2023 at 01:06:17PM +0100, Jan Kara wrote: > 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. Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 91758c8d77e5..703db2a4516b 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); }
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. Signed-off-by: Jan Kara <jack@suse.cz> --- fs/udf/inode.c | 4 ++++ 1 file changed, 4 insertions(+)