On Tue, Jun 18, 2024 at 11:17 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> 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.