On Sun, Jun 13, 2021 at 07:33:45PM -0400, Jeff Layton wrote:
> +static bool prep_noread_page(struct page *page, loff_t pos, size_t len)
>  {
> -     unsigned int i;
> +     struct inode *inode = page->mapping->host;
> +     loff_t i_size = i_size_read(inode);
> +     pgoff_t index = pos / thp_size(page);
> +     size_t offset = offset_in_page(pos);

offset_in_thp(page, pos);

With that change:

Reviewed-by: Matthew Wilcox (Oracle) <wi...@infradead.org>

--
Linux-cachefs mailing list
Linux-cachefs@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-cachefs

Reply via email to