All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: dhowells@redhat.com, linux-cachefs@redhat.com,
	idryomov@gmail.com, pfmeec@rit.edu, ceph-devel@vger.kernel.org,
	Andrew W Elble <aweits@rit.edu>
Subject: Re: [PATCH] netfs: fix test for whether we can skip read when writing beyond EOF
Date: Mon, 14 Jun 2021 01:08:13 +0100	[thread overview]
Message-ID: <YMad7WZ4PbHTPTxd@casper.infradead.org> (raw)
In-Reply-To: <20210613233345.113565-1-jlayton@kernel.org>

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@infradead.org>

  reply	other threads:[~2021-06-14  0:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13 23:33 [PATCH] netfs: fix test for whether we can skip read when writing beyond EOF Jeff Layton
2021-06-14  0:08 ` Matthew Wilcox [this message]
2021-06-14  9:50 ` David Howells
2021-06-14 10:04 ` David Howells
2021-06-14 11:35   ` Jeff Layton
2021-06-14 11:45   ` David Howells
2021-06-14 11:58     ` Matthew Wilcox
2021-06-14 11:51   ` Matthew Wilcox
2021-06-14 10:19 ` David Howells
2021-06-14 10:23 ` David Howells
2021-06-14 12:25 ` David Howells
2021-06-14 12:31   ` Jeff Layton
2021-06-14 12:54   ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YMad7WZ4PbHTPTxd@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=aweits@rit.edu \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dhowells@redhat.com \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-cachefs@redhat.com \
    --cc=pfmeec@rit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.