diff options
author | J. Bruce Fields <bfields@redhat.com> | 2014-10-01 11:36:31 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-10-23 14:05:11 -0400 |
commit | 280caac078d3db075247915f6d2f72315232ed16 (patch) | |
tree | 0240231b23e40ade309e9345a911118ef8061454 | |
parent | ed38c0699848508672793bbdcca98ee89aa6c71e (diff) |
rpc: change comments to assertions
Reported-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | net/sunrpc/xdr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index bcece520c4db..1cb61242e55e 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c | |||
@@ -619,7 +619,8 @@ void xdr_truncate_encode(struct xdr_stream *xdr, size_t len) | |||
619 | buf->len -= fraglen; | 619 | buf->len -= fraglen; |
620 | if (tail->iov_len) { | 620 | if (tail->iov_len) { |
621 | xdr->p = tail->iov_base + tail->iov_len; | 621 | xdr->p = tail->iov_base + tail->iov_len; |
622 | /* xdr->end, xdr->iov should be set already */ | 622 | WARN_ON_ONCE(!xdr->end); |
623 | WARN_ON_ONCE(!xdr->iov); | ||
623 | return; | 624 | return; |
624 | } | 625 | } |
625 | WARN_ON_ONCE(fraglen); | 626 | WARN_ON_ONCE(fraglen); |
@@ -635,7 +636,7 @@ void xdr_truncate_encode(struct xdr_stream *xdr, size_t len) | |||
635 | xdr->p = page_address(*xdr->page_ptr); | 636 | xdr->p = page_address(*xdr->page_ptr); |
636 | xdr->end = (void *)xdr->p + PAGE_SIZE; | 637 | xdr->end = (void *)xdr->p + PAGE_SIZE; |
637 | xdr->p = (void *)xdr->p + (new % PAGE_SIZE); | 638 | xdr->p = (void *)xdr->p + (new % PAGE_SIZE); |
638 | /* xdr->iov should already be NULL */ | 639 | WARN_ON_ONCE(xdr->iov); |
639 | return; | 640 | return; |
640 | } | 641 | } |
641 | if (fraglen) { | 642 | if (fraglen) { |