diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-06-21 14:53:10 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-06-28 17:20:46 -0400 |
commit | f8bb7f08549a1ced9ceb69a9bd5e163122044ab2 (patch) | |
tree | 9e67fa0a419c7ea3d8469d215bd2c8e80f8d74dc /net/sunrpc/xdr.c | |
parent | 3994ee6fbf5185b3183f4585432226e786bfe86c (diff) |
SUNRPC: Clean up xdr_enter_page
Use the xdr_align_pages() helper
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xdr.c')
-rw-r--r-- | net/sunrpc/xdr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 03603f332fe6..2e3694eccd82 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c | |||
@@ -826,13 +826,13 @@ EXPORT_SYMBOL_GPL(xdr_read_pages); | |||
826 | */ | 826 | */ |
827 | void xdr_enter_page(struct xdr_stream *xdr, unsigned int len) | 827 | void xdr_enter_page(struct xdr_stream *xdr, unsigned int len) |
828 | { | 828 | { |
829 | len = xdr_read_pages(xdr, len); | 829 | len = xdr_align_pages(xdr, len); |
830 | /* | 830 | /* |
831 | * Position current pointer at beginning of tail, and | 831 | * Position current pointer at beginning of tail, and |
832 | * set remaining message length. | 832 | * set remaining message length. |
833 | */ | 833 | */ |
834 | xdr_set_page_base(xdr, 0, len); | 834 | if (len != 0) |
835 | xdr->nwords += XDR_QUADLEN(xdr->buf->page_len); | 835 | xdr_set_page_base(xdr, 0, len); |
836 | } | 836 | } |
837 | EXPORT_SYMBOL_GPL(xdr_enter_page); | 837 | EXPORT_SYMBOL_GPL(xdr_enter_page); |
838 | 838 | ||