From: Barry Song <21cnbao@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org,
sfrench@samba.org, Barry Song <v-songbaohua@oppo.com>,
Christoph Hellwig <hch@lst.de>, NeilBrown <neilb@suse.de>,
Anna Schumaker <anna@kernel.org>,
Trond Myklebust <trondmy@kernel.org>,
Chuanhua Han <hanchuanhua@oppo.com>,
Ryan Roberts <ryan.roberts@arm.com>,
Chris Li <chrisl@kernel.org>,
"Huang, Ying" <ying.huang@intel.com>,
Jeff Layton <jlayton@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] nfs: fix the incorrect assertion in nfs_swap_rw()
Date: Tue, 18 Jun 2024 11:36:47 +1200 [thread overview]
Message-ID: <CAGsJ_4w2MQ_Cg2Mmf+_B-TLptK_fqR3q=zE+GgXxA999ifimWw@mail.gmail.com> (raw)
In-Reply-To: <ZnDEIV3zG2hyunoa@casper.infradead.org>
On Tue, Jun 18, 2024 at 11:17 AM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Tue, Jun 18, 2024 at 10:01:35AM +1200, Barry Song wrote:
> > +++ b/fs/nfs/direct.c
> > @@ -141,7 +141,7 @@ int nfs_swap_rw(struct kiocb *iocb, struct iov_iter *iter)
> > {
> > ssize_t ret;
> >
> > - VM_BUG_ON(iov_iter_count(iter) != PAGE_SIZE);
> > + VM_WARN_ON(iov_iter_count(iter) != iov_iter_npages(iter, INT_MAX) * PAGE_SIZE);
>
> Why not just delete the assertion like Christoph did?
I'm fine with either option. While maintaining this, my thought at the
time was that I might
want to reassess this assertion once mTHP swapout is supported on
swapfiles later.
prev parent reply other threads:[~2024-06-17 23:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 22:01 Barry Song
2024-06-17 23:17 ` Matthew Wilcox
2024-06-17 23:36 ` Barry Song [this message]
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='CAGsJ_4w2MQ_Cg2Mmf+_B-TLptK_fqR3q=zE+GgXxA999ifimWw@mail.gmail.com' \
--to=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=anna@kernel.org \
--cc=chrisl@kernel.org \
--cc=hanchuanhua@oppo.com \
--cc=hch@lst.de \
--cc=jlayton@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=ryan.roberts@arm.com \
--cc=sfrench@samba.org \
--cc=stable@vger.kernel.org \
--cc=trondmy@kernel.org \
--cc=v-songbaohua@oppo.com \
--cc=willy@infradead.org \
--cc=ying.huang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox