summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2026-01-03 02:55:08 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2026-01-07 20:28:27 +0300
commit60699ab7cbf0a4eb19929cce243002b39c67917d (patch)
tree1d92048995a4af969a341096f24655c6a74905de
parent001945a777ec4de8610f646397a054c62d272c2d (diff)
downloadlinux-60699ab7cbf0a4eb19929cce243002b39c67917d.tar.xz
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>
-rw-r--r--fs/nfs/localio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index c884245e8fb8..41fbcb3f9167 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -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);