rpc: change comments to assertions

Reported-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
J. Bruce Fields 2014-10-01 11:36:31 -04:00
parent ed38c06998
commit 280caac078
1 changed files with 3 additions and 2 deletions

View File

@ -619,7 +619,8 @@ void xdr_truncate_encode(struct xdr_stream *xdr, size_t len)
buf->len -= fraglen;
if (tail->iov_len) {
xdr->p = tail->iov_base + tail->iov_len;
/* xdr->end, xdr->iov should be set already */
WARN_ON_ONCE(!xdr->end);
WARN_ON_ONCE(!xdr->iov);
return;
}
WARN_ON_ONCE(fraglen);
@ -635,7 +636,7 @@ void xdr_truncate_encode(struct xdr_stream *xdr, size_t len)
xdr->p = page_address(*xdr->page_ptr);
xdr->end = (void *)xdr->p + PAGE_SIZE;
xdr->p = (void *)xdr->p + (new % PAGE_SIZE);
/* xdr->iov should already be NULL */
WARN_ON_ONCE(xdr->iov);
return;
}
if (fraglen) {