Skip to content

Commit

Permalink
udf: Add handling of in-ICB files to udf_bmap()
Browse files Browse the repository at this point in the history
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 <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Jan Kara committed Jan 26, 2023
1 parent c694e40 commit 907c6c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/udf/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 907c6c2

Please sign in to comment.