diff options
-rw-r--r-- | net/rds/ib_recv.c | 7 | ||||
-rw-r--r-- | net/rds/info.c | 6 | ||||
-rw-r--r-- | net/rds/iw_recv.c | 7 | ||||
-rw-r--r-- | net/rds/loop.c | 2 | ||||
-rw-r--r-- | net/rds/rds.h | 2 | ||||
-rw-r--r-- | net/rds/recv.c | 2 | ||||
-rw-r--r-- | net/rds/tcp_recv.c | 11 |
7 files changed, 16 insertions, 21 deletions
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index e29e0ca32f74..744a00dd29c3 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c | |||
@@ -763,7 +763,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn, | |||
763 | to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off); | 763 | to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off); |
764 | BUG_ON(to_copy & 7); /* Must be 64bit aligned. */ | 764 | BUG_ON(to_copy & 7); /* Must be 64bit aligned. */ |
765 | 765 | ||
766 | addr = kmap_atomic(sg_page(&frag->f_sg), KM_SOFTIRQ0); | 766 | addr = kmap_atomic(sg_page(&frag->f_sg)); |
767 | 767 | ||
768 | src = addr + frag_off; | 768 | src = addr + frag_off; |
769 | dst = (void *)map->m_page_addrs[map_page] + map_off; | 769 | dst = (void *)map->m_page_addrs[map_page] + map_off; |
@@ -773,7 +773,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn, | |||
773 | uncongested |= ~(*src) & *dst; | 773 | uncongested |= ~(*src) & *dst; |
774 | *dst++ = *src++; | 774 | *dst++ = *src++; |
775 | } | 775 | } |
776 | kunmap_atomic(addr, KM_SOFTIRQ0); | 776 | kunmap_atomic(addr); |
777 | 777 | ||
778 | copied += to_copy; | 778 | copied += to_copy; |
779 | 779 | ||
@@ -919,8 +919,7 @@ static void rds_ib_process_recv(struct rds_connection *conn, | |||
919 | rds_ib_cong_recv(conn, ibinc); | 919 | rds_ib_cong_recv(conn, ibinc); |
920 | else { | 920 | else { |
921 | rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr, | 921 | rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr, |
922 | &ibinc->ii_inc, GFP_ATOMIC, | 922 | &ibinc->ii_inc, GFP_ATOMIC); |
923 | KM_SOFTIRQ0); | ||
924 | state->ack_next = be64_to_cpu(hdr->h_sequence); | 923 | state->ack_next = be64_to_cpu(hdr->h_sequence); |
925 | state->ack_next_valid = 1; | 924 | state->ack_next_valid = 1; |
926 | } | 925 | } |
diff --git a/net/rds/info.c b/net/rds/info.c index f1c016c4146e..9a6b4f66187c 100644 --- a/net/rds/info.c +++ b/net/rds/info.c | |||
@@ -104,7 +104,7 @@ EXPORT_SYMBOL_GPL(rds_info_deregister_func); | |||
104 | void rds_info_iter_unmap(struct rds_info_iterator *iter) | 104 | void rds_info_iter_unmap(struct rds_info_iterator *iter) |
105 | { | 105 | { |
106 | if (iter->addr) { | 106 | if (iter->addr) { |
107 | kunmap_atomic(iter->addr, KM_USER0); | 107 | kunmap_atomic(iter->addr); |
108 | iter->addr = NULL; | 108 | iter->addr = NULL; |
109 | } | 109 | } |
110 | } | 110 | } |
@@ -119,7 +119,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data, | |||
119 | 119 | ||
120 | while (bytes) { | 120 | while (bytes) { |
121 | if (!iter->addr) | 121 | if (!iter->addr) |
122 | iter->addr = kmap_atomic(*iter->pages, KM_USER0); | 122 | iter->addr = kmap_atomic(*iter->pages); |
123 | 123 | ||
124 | this = min(bytes, PAGE_SIZE - iter->offset); | 124 | this = min(bytes, PAGE_SIZE - iter->offset); |
125 | 125 | ||
@@ -134,7 +134,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data, | |||
134 | iter->offset += this; | 134 | iter->offset += this; |
135 | 135 | ||
136 | if (iter->offset == PAGE_SIZE) { | 136 | if (iter->offset == PAGE_SIZE) { |
137 | kunmap_atomic(iter->addr, KM_USER0); | 137 | kunmap_atomic(iter->addr); |
138 | iter->addr = NULL; | 138 | iter->addr = NULL; |
139 | iter->offset = 0; | 139 | iter->offset = 0; |
140 | iter->pages++; | 140 | iter->pages++; |
diff --git a/net/rds/iw_recv.c b/net/rds/iw_recv.c index 5e57347f49ff..0bd9b5e7520d 100644 --- a/net/rds/iw_recv.c +++ b/net/rds/iw_recv.c | |||
@@ -598,7 +598,7 @@ static void rds_iw_cong_recv(struct rds_connection *conn, | |||
598 | to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off); | 598 | to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off); |
599 | BUG_ON(to_copy & 7); /* Must be 64bit aligned. */ | 599 | BUG_ON(to_copy & 7); /* Must be 64bit aligned. */ |
600 | 600 | ||
601 | addr = kmap_atomic(frag->f_page, KM_SOFTIRQ0); | 601 | addr = kmap_atomic(frag->f_page); |
602 | 602 | ||
603 | src = addr + frag_off; | 603 | src = addr + frag_off; |
604 | dst = (void *)map->m_page_addrs[map_page] + map_off; | 604 | dst = (void *)map->m_page_addrs[map_page] + map_off; |
@@ -608,7 +608,7 @@ static void rds_iw_cong_recv(struct rds_connection *conn, | |||
608 | uncongested |= ~(*src) & *dst; | 608 | uncongested |= ~(*src) & *dst; |
609 | *dst++ = *src++; | 609 | *dst++ = *src++; |
610 | } | 610 | } |
611 | kunmap_atomic(addr, KM_SOFTIRQ0); | 611 | kunmap_atomic(addr); |
612 | 612 | ||
613 | copied += to_copy; | 613 | copied += to_copy; |
614 | 614 | ||
@@ -754,8 +754,7 @@ static void rds_iw_process_recv(struct rds_connection *conn, | |||
754 | rds_iw_cong_recv(conn, iwinc); | 754 | rds_iw_cong_recv(conn, iwinc); |
755 | else { | 755 | else { |
756 | rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr, | 756 | rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr, |
757 | &iwinc->ii_inc, GFP_ATOMIC, | 757 | &iwinc->ii_inc, GFP_ATOMIC); |
758 | KM_SOFTIRQ0); | ||
759 | state->ack_next = be64_to_cpu(hdr->h_sequence); | 758 | state->ack_next = be64_to_cpu(hdr->h_sequence); |
760 | state->ack_next_valid = 1; | 759 | state->ack_next_valid = 1; |
761 | } | 760 | } |
diff --git a/net/rds/loop.c b/net/rds/loop.c index bca6761a3ca2..87ff2a8a454b 100644 --- a/net/rds/loop.c +++ b/net/rds/loop.c | |||
@@ -79,7 +79,7 @@ static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm, | |||
79 | rds_message_addref(rm); | 79 | rds_message_addref(rm); |
80 | 80 | ||
81 | rds_recv_incoming(conn, conn->c_laddr, conn->c_faddr, &rm->m_inc, | 81 | rds_recv_incoming(conn, conn->c_laddr, conn->c_faddr, &rm->m_inc, |
82 | GFP_KERNEL, KM_USER0); | 82 | GFP_KERNEL); |
83 | 83 | ||
84 | rds_send_drop_acked(conn, be64_to_cpu(rm->m_inc.i_hdr.h_sequence), | 84 | rds_send_drop_acked(conn, be64_to_cpu(rm->m_inc.i_hdr.h_sequence), |
85 | NULL); | 85 | NULL); |
diff --git a/net/rds/rds.h b/net/rds/rds.h index 7eaba1831f0d..ec1d731ecff0 100644 --- a/net/rds/rds.h +++ b/net/rds/rds.h | |||
@@ -704,7 +704,7 @@ void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn, | |||
704 | __be32 saddr); | 704 | __be32 saddr); |
705 | void rds_inc_put(struct rds_incoming *inc); | 705 | void rds_inc_put(struct rds_incoming *inc); |
706 | void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr, | 706 | void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr, |
707 | struct rds_incoming *inc, gfp_t gfp, enum km_type km); | 707 | struct rds_incoming *inc, gfp_t gfp); |
708 | int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, | 708 | int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, |
709 | size_t size, int msg_flags); | 709 | size_t size, int msg_flags); |
710 | void rds_clear_recv_queue(struct rds_sock *rs); | 710 | void rds_clear_recv_queue(struct rds_sock *rs); |
diff --git a/net/rds/recv.c b/net/rds/recv.c index bc3f8cd6d070..5c6e9f132026 100644 --- a/net/rds/recv.c +++ b/net/rds/recv.c | |||
@@ -155,7 +155,7 @@ static void rds_recv_incoming_exthdrs(struct rds_incoming *inc, struct rds_sock | |||
155 | * tell us which roles the addrs in the conn are playing for this message. | 155 | * tell us which roles the addrs in the conn are playing for this message. |
156 | */ | 156 | */ |
157 | void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr, | 157 | void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr, |
158 | struct rds_incoming *inc, gfp_t gfp, enum km_type km) | 158 | struct rds_incoming *inc, gfp_t gfp) |
159 | { | 159 | { |
160 | struct rds_sock *rs = NULL; | 160 | struct rds_sock *rs = NULL; |
161 | struct sock *sk; | 161 | struct sock *sk; |
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c index 78205e25500a..6243258f840f 100644 --- a/net/rds/tcp_recv.c +++ b/net/rds/tcp_recv.c | |||
@@ -169,7 +169,6 @@ static void rds_tcp_cong_recv(struct rds_connection *conn, | |||
169 | struct rds_tcp_desc_arg { | 169 | struct rds_tcp_desc_arg { |
170 | struct rds_connection *conn; | 170 | struct rds_connection *conn; |
171 | gfp_t gfp; | 171 | gfp_t gfp; |
172 | enum km_type km; | ||
173 | }; | 172 | }; |
174 | 173 | ||
175 | static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb, | 174 | static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb, |
@@ -255,7 +254,7 @@ static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb, | |||
255 | else | 254 | else |
256 | rds_recv_incoming(conn, conn->c_faddr, | 255 | rds_recv_incoming(conn, conn->c_faddr, |
257 | conn->c_laddr, &tinc->ti_inc, | 256 | conn->c_laddr, &tinc->ti_inc, |
258 | arg->gfp, arg->km); | 257 | arg->gfp); |
259 | 258 | ||
260 | tc->t_tinc_hdr_rem = sizeof(struct rds_header); | 259 | tc->t_tinc_hdr_rem = sizeof(struct rds_header); |
261 | tc->t_tinc_data_rem = 0; | 260 | tc->t_tinc_data_rem = 0; |
@@ -272,8 +271,7 @@ out: | |||
272 | } | 271 | } |
273 | 272 | ||
274 | /* the caller has to hold the sock lock */ | 273 | /* the caller has to hold the sock lock */ |
275 | static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp, | 274 | static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp) |
276 | enum km_type km) | ||
277 | { | 275 | { |
278 | struct rds_tcp_connection *tc = conn->c_transport_data; | 276 | struct rds_tcp_connection *tc = conn->c_transport_data; |
279 | struct socket *sock = tc->t_sock; | 277 | struct socket *sock = tc->t_sock; |
@@ -283,7 +281,6 @@ static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp, | |||
283 | /* It's like glib in the kernel! */ | 281 | /* It's like glib in the kernel! */ |
284 | arg.conn = conn; | 282 | arg.conn = conn; |
285 | arg.gfp = gfp; | 283 | arg.gfp = gfp; |
286 | arg.km = km; | ||
287 | desc.arg.data = &arg; | 284 | desc.arg.data = &arg; |
288 | desc.error = 0; | 285 | desc.error = 0; |
289 | desc.count = 1; /* give more than one skb per call */ | 286 | desc.count = 1; /* give more than one skb per call */ |
@@ -311,7 +308,7 @@ int rds_tcp_recv(struct rds_connection *conn) | |||
311 | rdsdebug("recv worker conn %p tc %p sock %p\n", conn, tc, sock); | 308 | rdsdebug("recv worker conn %p tc %p sock %p\n", conn, tc, sock); |
312 | 309 | ||
313 | lock_sock(sock->sk); | 310 | lock_sock(sock->sk); |
314 | ret = rds_tcp_read_sock(conn, GFP_KERNEL, KM_USER0); | 311 | ret = rds_tcp_read_sock(conn, GFP_KERNEL); |
315 | release_sock(sock->sk); | 312 | release_sock(sock->sk); |
316 | 313 | ||
317 | return ret; | 314 | return ret; |
@@ -336,7 +333,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes) | |||
336 | ready = tc->t_orig_data_ready; | 333 | ready = tc->t_orig_data_ready; |
337 | rds_tcp_stats_inc(s_tcp_data_ready_calls); | 334 | rds_tcp_stats_inc(s_tcp_data_ready_calls); |
338 | 335 | ||
339 | if (rds_tcp_read_sock(conn, GFP_ATOMIC, KM_SOFTIRQ0) == -ENOMEM) | 336 | if (rds_tcp_read_sock(conn, GFP_ATOMIC) == -ENOMEM) |
340 | queue_delayed_work(rds_wq, &conn->c_recv_w, 0); | 337 | queue_delayed_work(rds_wq, &conn->c_recv_w, 0); |
341 | out: | 338 | out: |
342 | read_unlock_bh(&sk->sk_callback_lock); | 339 | read_unlock_bh(&sk->sk_callback_lock); |