Re: [PATCH] netfs: fix test for whether we can skip read when writing beyond EOF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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) <willy@xxxxxxxxxxxxx>



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux