diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/cache.c | 2 | ||||
-rw-r--r-- | net/sunrpc/sched.c | 5 | ||||
-rw-r--r-- | net/sunrpc/xprt.c | 5 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/rpc_rdma.c | 6 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 6 |
5 files changed, 14 insertions, 10 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 8e05557414ce..73f053d0cc7a 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -1127,6 +1127,7 @@ struct handle { | |||
1127 | }; | 1127 | }; |
1128 | 1128 | ||
1129 | static void *c_start(struct seq_file *m, loff_t *pos) | 1129 | static void *c_start(struct seq_file *m, loff_t *pos) |
1130 | __acquires(cd->hash_lock) | ||
1130 | { | 1131 | { |
1131 | loff_t n = *pos; | 1132 | loff_t n = *pos; |
1132 | unsigned hash, entry; | 1133 | unsigned hash, entry; |
@@ -1183,6 +1184,7 @@ static void *c_next(struct seq_file *m, void *p, loff_t *pos) | |||
1183 | } | 1184 | } |
1184 | 1185 | ||
1185 | static void c_stop(struct seq_file *m, void *p) | 1186 | static void c_stop(struct seq_file *m, void *p) |
1187 | __releases(cd->hash_lock) | ||
1186 | { | 1188 | { |
1187 | struct cache_detail *cd = ((struct handle*)m->private)->cd; | 1189 | struct cache_detail *cd = ((struct handle*)m->private)->cd; |
1188 | read_unlock(&cd->hash_lock); | 1190 | read_unlock(&cd->hash_lock); |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index c98873f39aec..eed5dd9819cd 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -811,9 +811,8 @@ EXPORT_SYMBOL_GPL(rpc_free); | |||
811 | void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, int flags, const struct rpc_call_ops *tk_ops, void *calldata) | 811 | void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, int flags, const struct rpc_call_ops *tk_ops, void *calldata) |
812 | { | 812 | { |
813 | memset(task, 0, sizeof(*task)); | 813 | memset(task, 0, sizeof(*task)); |
814 | init_timer(&task->tk_timer); | 814 | setup_timer(&task->tk_timer, (void (*)(unsigned long))rpc_run_timer, |
815 | task->tk_timer.data = (unsigned long) task; | 815 | (unsigned long)task); |
816 | task->tk_timer.function = (void (*)(unsigned long)) rpc_run_timer; | ||
817 | atomic_set(&task->tk_count, 1); | 816 | atomic_set(&task->tk_count, 1); |
818 | task->tk_client = clnt; | 817 | task->tk_client = clnt; |
819 | task->tk_flags = flags; | 818 | task->tk_flags = flags; |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index cd641c8634f0..fb92f51405c5 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -1011,9 +1011,8 @@ found: | |||
1011 | INIT_LIST_HEAD(&xprt->free); | 1011 | INIT_LIST_HEAD(&xprt->free); |
1012 | INIT_LIST_HEAD(&xprt->recv); | 1012 | INIT_LIST_HEAD(&xprt->recv); |
1013 | INIT_WORK(&xprt->task_cleanup, xprt_autoclose); | 1013 | INIT_WORK(&xprt->task_cleanup, xprt_autoclose); |
1014 | init_timer(&xprt->timer); | 1014 | setup_timer(&xprt->timer, xprt_init_autodisconnect, |
1015 | xprt->timer.function = xprt_init_autodisconnect; | 1015 | (unsigned long)xprt); |
1016 | xprt->timer.data = (unsigned long) xprt; | ||
1017 | xprt->last_used = jiffies; | 1016 | xprt->last_used = jiffies; |
1018 | xprt->cwnd = RPC_INITCWND; | 1017 | xprt->cwnd = RPC_INITCWND; |
1019 | xprt->bind_index = 0; | 1018 | xprt->bind_index = 0; |
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index ee8de7af2a5b..1aa1580cda6d 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c | |||
@@ -380,7 +380,7 @@ rpcrdma_marshal_req(struct rpc_rqst *rqst) | |||
380 | headerp->rm_xid = rqst->rq_xid; | 380 | headerp->rm_xid = rqst->rq_xid; |
381 | headerp->rm_vers = xdr_one; | 381 | headerp->rm_vers = xdr_one; |
382 | headerp->rm_credit = htonl(r_xprt->rx_buf.rb_max_requests); | 382 | headerp->rm_credit = htonl(r_xprt->rx_buf.rb_max_requests); |
383 | headerp->rm_type = __constant_htonl(RDMA_MSG); | 383 | headerp->rm_type = htonl(RDMA_MSG); |
384 | 384 | ||
385 | /* | 385 | /* |
386 | * Chunks needed for results? | 386 | * Chunks needed for results? |
@@ -458,11 +458,11 @@ rpcrdma_marshal_req(struct rpc_rqst *rqst) | |||
458 | RPCRDMA_INLINE_PAD_VALUE(rqst)); | 458 | RPCRDMA_INLINE_PAD_VALUE(rqst)); |
459 | 459 | ||
460 | if (padlen) { | 460 | if (padlen) { |
461 | headerp->rm_type = __constant_htonl(RDMA_MSGP); | 461 | headerp->rm_type = htonl(RDMA_MSGP); |
462 | headerp->rm_body.rm_padded.rm_align = | 462 | headerp->rm_body.rm_padded.rm_align = |
463 | htonl(RPCRDMA_INLINE_PAD_VALUE(rqst)); | 463 | htonl(RPCRDMA_INLINE_PAD_VALUE(rqst)); |
464 | headerp->rm_body.rm_padded.rm_thresh = | 464 | headerp->rm_body.rm_padded.rm_thresh = |
465 | __constant_htonl(RPCRDMA_INLINE_PAD_THRESH); | 465 | htonl(RPCRDMA_INLINE_PAD_THRESH); |
466 | headerp->rm_body.rm_padded.rm_pempty[0] = xdr_zero; | 466 | headerp->rm_body.rm_padded.rm_pempty[0] = xdr_zero; |
467 | headerp->rm_body.rm_padded.rm_pempty[1] = xdr_zero; | 467 | headerp->rm_body.rm_padded.rm_pempty[1] = xdr_zero; |
468 | headerp->rm_body.rm_padded.rm_pempty[2] = xdr_zero; | 468 | headerp->rm_body.rm_padded.rm_pempty[2] = xdr_zero; |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 2f630a512ab7..6fa52f44de0f 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -838,8 +838,12 @@ static void xs_udp_data_ready(struct sock *sk, int len) | |||
838 | copied = repsize; | 838 | copied = repsize; |
839 | 839 | ||
840 | /* Suck it into the iovec, verify checksum if not done by hw. */ | 840 | /* Suck it into the iovec, verify checksum if not done by hw. */ |
841 | if (csum_partial_copy_to_xdr(&rovr->rq_private_buf, skb)) | 841 | if (csum_partial_copy_to_xdr(&rovr->rq_private_buf, skb)) { |
842 | UDPX_INC_STATS_BH(sk, UDP_MIB_INERRORS); | ||
842 | goto out_unlock; | 843 | goto out_unlock; |
844 | } | ||
845 | |||
846 | UDPX_INC_STATS_BH(sk, UDP_MIB_INDATAGRAMS); | ||
843 | 847 | ||
844 | /* Something worked... */ | 848 | /* Something worked... */ |
845 | dst_confirm(skb->dst); | 849 | dst_confirm(skb->dst); |