aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/socklib.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/socklib.c')
-rw-r--r--net/sunrpc/socklib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c
index 6f17527b9e69..2635c543ba06 100644
--- a/net/sunrpc/socklib.c
+++ b/net/sunrpc/socklib.c
@@ -45,7 +45,8 @@ static size_t skb_read_bits(skb_reader_t *desc, void *to, size_t len)
45 */ 45 */
46static size_t skb_read_and_csum_bits(skb_reader_t *desc, void *to, size_t len) 46static size_t skb_read_and_csum_bits(skb_reader_t *desc, void *to, size_t len)
47{ 47{
48 unsigned int csum2, pos; 48 unsigned int pos;
49 __wsum csum2;
49 50
50 if (len > desc->count) 51 if (len > desc->count)
51 len = desc->count; 52 len = desc->count;
@@ -160,13 +161,13 @@ int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb)
160 if (xdr_partial_copy_from_skb(xdr, 0, &desc, skb_read_and_csum_bits) < 0) 161 if (xdr_partial_copy_from_skb(xdr, 0, &desc, skb_read_and_csum_bits) < 0)
161 return -1; 162 return -1;
162 if (desc.offset != skb->len) { 163 if (desc.offset != skb->len) {
163 unsigned int csum2; 164 __wsum csum2;
164 csum2 = skb_checksum(skb, desc.offset, skb->len - desc.offset, 0); 165 csum2 = skb_checksum(skb, desc.offset, skb->len - desc.offset, 0);
165 desc.csum = csum_block_add(desc.csum, csum2, desc.offset); 166 desc.csum = csum_block_add(desc.csum, csum2, desc.offset);
166 } 167 }
167 if (desc.count) 168 if (desc.count)
168 return -1; 169 return -1;
169 if ((unsigned short)csum_fold(desc.csum)) 170 if (csum_fold(desc.csum))
170 return -1; 171 return -1;
171 if (unlikely(skb->ip_summed == CHECKSUM_COMPLETE)) 172 if (unlikely(skb->ip_summed == CHECKSUM_COMPLETE))
172 netdev_rx_csum_fault(skb->dev); 173 netdev_rx_csum_fault(skb->dev);