aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/tcp_recv.c
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2011-11-25 10:14:40 -0500
committerCong Wang <xiyou.wangcong@gmail.com>2012-03-20 09:48:28 -0400
commit6114eab535ab49239e0a6ce08eb9243664aef993 (patch)
treecb699cfc9f29eb80105f6513fc4679b5ade5df46 /net/rds/tcp_recv.c
parent0352bc550cfa536e4fa2c0e906359bcd5687afff (diff)
rds: remove the second argument of k[un]map_atomic()
Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com>
Diffstat (limited to 'net/rds/tcp_recv.c')
-rw-r--r--net/rds/tcp_recv.c11
1 files changed, 4 insertions, 7 deletions
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,
169struct rds_tcp_desc_arg { 169struct 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
175static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb, 174static 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 */
275static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp, 274static 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);
341out: 338out:
342 read_unlock_bh(&sk->sk_callback_lock); 339 read_unlock_bh(&sk->sk_callback_lock);