Skip to content

Commit

Permalink
Merge tag 'nfsd-6.5-4' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/cel/linux

Pull nfsd fix from Chuck Lever:

 - Fix new MSG_SPLICE_PAGES support in server's TCP sendmsg helper

* tag 'nfsd-6.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  sunrpc: set the bv_offset of first bvec in svc_tcp_sendmsg
  • Loading branch information
torvalds committed Aug 17, 2023
2 parents 4853c74 + c96e2a6 commit 1693185
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/sunrpc/svcsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,9 @@ static int svc_tcp_sendmsg(struct socket *sock, struct xdr_buf *xdr,
if (ret != head->iov_len)
goto out;

if (xdr_buf_pagecount(xdr))
xdr->bvec[0].bv_offset = offset_in_page(xdr->page_base);

msg.msg_flags = MSG_SPLICE_PAGES;
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, xdr->bvec,
xdr_buf_pagecount(xdr), xdr->page_len);
Expand Down

0 comments on commit 1693185

Please sign in to comment.