mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
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: 091bdcfcec ("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>
This commit is contained in:
parent
001945a777
commit
60699ab7cb
|
|
@ -461,6 +461,8 @@ nfs_local_iters_init(struct nfs_local_kiocb *iocb, int rw)
|
|||
v = 0;
|
||||
total = hdr->args.count;
|
||||
base = hdr->args.pgbase;
|
||||
pagevec += base >> PAGE_SHIFT;
|
||||
base &= ~PAGE_MASK;
|
||||
while (total && v < hdr->page_array.npages) {
|
||||
len = min_t(size_t, total, PAGE_SIZE - base);
|
||||
bvec_set_page(&iocb->bvec[v], *pagevec, len, base);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user