Skip to content

Commit

Permalink
rpc: change comments to assertions
Browse files Browse the repository at this point in the history
Reported-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
J. Bruce Fields committed Oct 23, 2014
1 parent ed38c06 commit 280caac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/sunrpc/xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down

0 comments on commit 280caac

Please sign in to comment.