Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320187
b: refs/heads/master
c: b760b31
h: refs/heads/master
i:
  320185: d713d1b
  320183: c78a443
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 28, 2012
1 parent e19d160 commit db7ca26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1aecca3e83e5da981ade916920d3d2a6b9644cc3
refs/heads/master: b760b3131d962dd35925fb65956afe621fa65ec4
6 changes: 3 additions & 3 deletions trunk/net/sunrpc/xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ unsigned int xdr_read_pages(struct xdr_stream *xdr, unsigned int len)
struct kvec *iov;
ssize_t shift;
unsigned int nwords = XDR_QUADLEN(len);
unsigned int cur = xdr_stream_pos(xdr);
unsigned int end;
int padding;

Expand All @@ -775,9 +776,8 @@ unsigned int xdr_read_pages(struct xdr_stream *xdr, unsigned int len)
}
/* Realign pages to current pointer position */
iov = buf->head;
shift = iov->iov_len + (char *)iov->iov_base - (char *)xdr->p;
if (shift > 0)
xdr_shrink_bufhead(buf, shift);
if (iov->iov_len > cur)
xdr_shrink_bufhead(buf, iov->iov_len - cur);

/* Truncate page data and move it into the tail */
if (buf->page_len > len)
Expand Down

0 comments on commit db7ca26

Please sign in to comment.