Commit 7bafbd40 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'nfsd-6.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd fix from Chuck Lever:

 - Fix tmpfs splice read support

* tag 'nfsd-6.5-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  nfsd: Fix reading via splice
parents 556c9424 101df45e
...@@ -956,10 +956,13 @@ nfsd_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf, ...@@ -956,10 +956,13 @@ nfsd_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
last_page = page + (offset + sd->len - 1) / PAGE_SIZE; last_page = page + (offset + sd->len - 1) / PAGE_SIZE;
for (page += offset / PAGE_SIZE; page <= last_page; page++) { for (page += offset / PAGE_SIZE; page <= last_page; page++) {
/* /*
* Skip page replacement when extending the contents * Skip page replacement when extending the contents of the
* of the current page. * current page. But note that we may get two zero_pages in a
* row from shmem.
*/ */
if (page == *(rqstp->rq_next_page - 1)) if (page == *(rqstp->rq_next_page - 1) &&
offset_in_page(rqstp->rq_res.page_base +
rqstp->rq_res.page_len))
continue; continue;
if (unlikely(!svc_rqst_replace_page(rqstp, page))) if (unlikely(!svc_rqst_replace_page(rqstp, page)))
return -EIO; return -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment