diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-08-01 14:32:13 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-09-26 12:43:10 -0400 |
commit | 8a9a8b8332b92b13316cf49685b5dc5257cfe115 (patch) | |
tree | e3a0d5b5d0b9191e3a21f488dedd1f7aeb4dc968 /net/sunrpc | |
parent | 62d98c935456ee121b03d6a68aa3091a04085b7e (diff) |
SUNRPC: Fix the return value of xdr_align_pages()
The callers of xdr_align_pages() expect it to return the number of bytes
of actual XDR data remaining in the pages.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xdr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 0afba1b4b656..fbbd1c475b43 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -742,6 +742,8 @@ static unsigned int xdr_align_pages(struct xdr_stream *xdr, unsigned int len) /* Truncate page data and move it into the tail */ if (buf->page_len > len) xdr_shrink_pagelen(buf, buf->page_len - len); + else + len = buf->page_len; xdr->nwords = XDR_QUADLEN(buf->len - cur); return len; } |