Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFS/localio: Deal with page bases that are > PAGE_SIZE

When resending requests, etc, the page base can quickly grow larger than
the page size.

Fixes: 091bdcfcece0 ("nfs/localio: refactor iocb and iov_iter_bvec initialization")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>

+2
+2
fs/nfs/localio.c
··· 461 461 v = 0; 462 462 total = hdr->args.count; 463 463 base = hdr->args.pgbase; 464 + pagevec += base >> PAGE_SHIFT; 465 + base &= ~PAGE_MASK; 464 466 while (total && v < hdr->page_array.npages) { 465 467 len = min_t(size_t, total, PAGE_SIZE - base); 466 468 bvec_set_page(&iocb->bvec[v], *pagevec, len, base);