linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Barry Song <21cnbao@gmail.com>
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 00:17:53 +0100	[thread overview]
Message-ID: <ZnDEIV3zG2hyunoa@casper.infradead.org> (raw)
In-Reply-To: <20240617220135.43563-1-21cnbao@gmail.com>

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?


  reply	other threads:[~2024-06-17 23:18 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 [this message]
2024-06-17 23:36   ` Barry Song

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=ZnDEIV3zG2hyunoa@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=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=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