projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62d98c9
)
SUNRPC: Fix the return value of xdr_align_pages()
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Wed, 1 Aug 2012 18:32:13 +0000
(14:32 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Wed, 26 Sep 2012 16:43:10 +0000
(12:43 -0400)
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>
net/sunrpc/xdr.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sunrpc/xdr.c
b/net/sunrpc/xdr.c
index 0afba1b4b65606437d141cb21a64e6d00f3855f4..fbbd1c475b43c617b5e3061e8c941867578b07b2 100644
(file)
--- 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;
}