From: Christoph Hellwig <hch@lst.de>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: Steve French <sfrench@samba.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org,
linux-mm@kvack.org
Subject: [PATCH] nfs: fix nfs_swap_rw for large-folio swap
Date: Fri, 14 Jun 2024 12:03:25 +0200 [thread overview]
Message-ID: <20240614100329.1203579-2-hch@lst.de> (raw)
In-Reply-To: <20240614100329.1203579-1-hch@lst.de>
As of Linux 6.10-rc the MM can swap out larger than page size chunks.
NFS has all code ready to handle this, but has a VM_BUG_ON that
triggers when this happens. Simply remove the VM_BUG_ON to fix this
use case.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/nfs/direct.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index bb2f583eb28bf1..90079ca134dd3c 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -141,8 +141,6 @@ int nfs_swap_rw(struct kiocb *iocb, struct iov_iter *iter)
{
ssize_t ret;
- VM_BUG_ON(iov_iter_count(iter) != PAGE_SIZE);
-
if (iov_iter_rw(iter) == READ)
ret = nfs_file_direct_read(iocb, iter, true);
else
--
2.43.0
next prev parent reply other threads:[~2024-06-14 10:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 10:03 fix swap on NFS Christoph Hellwig
2024-06-14 10:03 ` Christoph Hellwig [this message]
2024-06-14 17:52 ` [PATCH] nfs: fix nfs_swap_rw for large-folio swap Jeff Layton
2024-06-14 18:21 ` Andrew Morton
2024-06-16 0:16 ` Barry Song
2024-06-16 8:54 ` Christoph Hellwig
2024-06-16 10:23 ` Barry Song
2024-06-17 5:32 ` Christoph Hellwig
2024-06-17 8:02 ` Barry Song
2024-06-18 5:52 ` Christoph Hellwig
2024-06-18 6:05 ` Barry Song
2024-06-18 6:13 ` Christoph Hellwig
2024-06-18 6:31 ` Barry Song
2024-06-17 8:03 ` Ryan Roberts
2024-06-17 9:40 ` Barry Song
2024-06-17 10:33 ` Ryan Roberts
2024-06-18 6:48 ` Martin Wege
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=20240614100329.1203579-2-hch@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=anna@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=sfrench@samba.org \
--cc=trondmy@kernel.org \
/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