diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/rpc_rdma.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index 9e11ce715958..ee8de7af2a5b 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c | |||
@@ -92,7 +92,6 @@ rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, int pos, | |||
92 | seg[n].mr_page = NULL; | 92 | seg[n].mr_page = NULL; |
93 | seg[n].mr_offset = xdrbuf->head[0].iov_base; | 93 | seg[n].mr_offset = xdrbuf->head[0].iov_base; |
94 | seg[n].mr_len = xdrbuf->head[0].iov_len; | 94 | seg[n].mr_len = xdrbuf->head[0].iov_len; |
95 | pos += xdrbuf->head[0].iov_len; | ||
96 | ++n; | 95 | ++n; |
97 | } | 96 | } |
98 | 97 | ||
@@ -104,7 +103,6 @@ rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, int pos, | |||
104 | seg[n].mr_len = min_t(u32, | 103 | seg[n].mr_len = min_t(u32, |
105 | PAGE_SIZE - xdrbuf->page_base, xdrbuf->page_len); | 104 | PAGE_SIZE - xdrbuf->page_base, xdrbuf->page_len); |
106 | len = xdrbuf->page_len - seg[n].mr_len; | 105 | len = xdrbuf->page_len - seg[n].mr_len; |
107 | pos += len; | ||
108 | ++n; | 106 | ++n; |
109 | p = 1; | 107 | p = 1; |
110 | while (len > 0) { | 108 | while (len > 0) { |
@@ -119,20 +117,15 @@ rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, int pos, | |||
119 | } | 117 | } |
120 | } | 118 | } |
121 | 119 | ||
122 | if (pos < xdrbuf->len && xdrbuf->tail[0].iov_len) { | 120 | if (xdrbuf->tail[0].iov_len) { |
123 | if (n == nsegs) | 121 | if (n == nsegs) |
124 | return 0; | 122 | return 0; |
125 | seg[n].mr_page = NULL; | 123 | seg[n].mr_page = NULL; |
126 | seg[n].mr_offset = xdrbuf->tail[0].iov_base; | 124 | seg[n].mr_offset = xdrbuf->tail[0].iov_base; |
127 | seg[n].mr_len = xdrbuf->tail[0].iov_len; | 125 | seg[n].mr_len = xdrbuf->tail[0].iov_len; |
128 | pos += xdrbuf->tail[0].iov_len; | ||
129 | ++n; | 126 | ++n; |
130 | } | 127 | } |
131 | 128 | ||
132 | if (pos < xdrbuf->len) | ||
133 | dprintk("RPC: %s: marshaled only %d of %d\n", | ||
134 | __func__, pos, xdrbuf->len); | ||
135 | |||
136 | return n; | 129 | return n; |
137 | } | 130 | } |
138 | 131 | ||