> +iomap_to_bh(struct inode *inode, struct page *page, sector_t block, > + struct buffer_head *bh, struct iomap *iomap) > { > loff_t offset = block << inode->i_blkbits; > > @@ -1924,6 +1924,10 @@ iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh, > inode->i_blkbits; > set_buffer_mapped(bh); > break; > + case IOMAP_INLINE: > + __iomap_read_inline_data(inode, page, iomap); > + set_buffer_uptodate(bh); > + break; I have to say I hate pushing this into the legacy buffer_head code. My hope was that we could get rid of this code rather than adding to it. The other issue is that this now calls iomap functions from buffer.c, which I'd also really avoid. That being said until the tail packing fs (erofs?) actually uses buffer_heads we should not need this hunk, and I don't think erofs should have any reason to use buffer_heads. > +#define offset_in_block(offset, inode) \ > + ((unsigned long)(offset) & (i_blocksize(inode) - 1)) Make this an inline function, please. I think we also have a few other places that could make use of this helper, maybe it might even go into fs.h. Otherwise this looks sensible to me.