diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 03603f332fe6a4e282f4667047a874f3c0a416e9..2e3694eccd82b3e54a2cc5da8eb7d933321cdbbb 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -826,13 +826,13 @@ EXPORT_SYMBOL_GPL(xdr_read_pages); */ void xdr_enter_page(struct xdr_stream *xdr, unsigned int len) { - len = xdr_read_pages(xdr, len); + len = xdr_align_pages(xdr, len); /* * Position current pointer at beginning of tail, and * set remaining message length. */ - xdr_set_page_base(xdr, 0, len); - xdr->nwords += XDR_QUADLEN(xdr->buf->page_len); + if (len != 0) + xdr_set_page_base(xdr, 0, len); } EXPORT_SYMBOL_GPL(xdr_enter_page);