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]

 



Jeff Layton <jlayton@xxxxxxxxxx> wrote:

> +	/* full page write */
> +	if (offset == 0 && len >= thp_size(page))
> +		goto zero_out;

Why not just return?

David Howells <dhowells@xxxxxxxxxx> wrote:

> Why not:
> 
> 	if (page_offset(page) >= i_size)

And if I switch to this, then:

	/* Zero-length file */
	if (i_size == 0)
		goto zero_out;

this is redundant.

David

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




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux