rds: remove the second argument of k[un]map_atomic()
authorCong Wang <amwang@redhat.com>
Fri, 25 Nov 2011 15:14:40 +0000 (23:14 +0800)
committerCong Wang <xiyou.wangcong@gmail.com>
Tue, 20 Mar 2012 13:48:28 +0000 (21:48 +0800)
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
net/rds/ib_recv.c
net/rds/info.c
net/rds/iw_recv.c
net/rds/loop.c
net/rds/rds.h
net/rds/recv.c
net/rds/tcp_recv.c

index e29e0ca32f740d978aeccf23a4fba5453a4e8aa4..744a00dd29c3df81c5d3baba053aa1673a79a8bc 100644 (file)
@@ -763,7 +763,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
                to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off);
                BUG_ON(to_copy & 7); /* Must be 64bit aligned. */
 
-               addr = kmap_atomic(sg_page(&frag->f_sg), KM_SOFTIRQ0);
+               addr = kmap_atomic(sg_page(&frag->f_sg));
 
                src = addr + frag_off;
                dst = (void *)map->m_page_addrs[map_page] + map_off;
@@ -773,7 +773,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
                        uncongested |= ~(*src) & *dst;
                        *dst++ = *src++;
                }
-               kunmap_atomic(addr, KM_SOFTIRQ0);
+               kunmap_atomic(addr);
 
                copied += to_copy;
 
@@ -919,8 +919,7 @@ static void rds_ib_process_recv(struct rds_connection *conn,
                        rds_ib_cong_recv(conn, ibinc);
                else {
                        rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr,
-                                         &ibinc->ii_inc, GFP_ATOMIC,
-                                         KM_SOFTIRQ0);
+                                         &ibinc->ii_inc, GFP_ATOMIC);
                        state->ack_next = be64_to_cpu(hdr->h_sequence);
                        state->ack_next_valid = 1;
                }
index f1c016c4146ec4092202f18db1abd0c0ce104017..9a6b4f66187cf3e5ab533cd01344c9856834ebb7 100644 (file)
@@ -104,7 +104,7 @@ EXPORT_SYMBOL_GPL(rds_info_deregister_func);
 void rds_info_iter_unmap(struct rds_info_iterator *iter)
 {
        if (iter->addr) {
-               kunmap_atomic(iter->addr, KM_USER0);
+               kunmap_atomic(iter->addr);
                iter->addr = NULL;
        }
 }
@@ -119,7 +119,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data,
 
        while (bytes) {
                if (!iter->addr)
-                       iter->addr = kmap_atomic(*iter->pages, KM_USER0);
+                       iter->addr = kmap_atomic(*iter->pages);
 
                this = min(bytes, PAGE_SIZE - iter->offset);
 
@@ -134,7 +134,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data,
                iter->offset += this;
 
                if (iter->offset == PAGE_SIZE) {
-                       kunmap_atomic(iter->addr, KM_USER0);
+                       kunmap_atomic(iter->addr);
                        iter->addr = NULL;
                        iter->offset = 0;
                        iter->pages++;
index 5e57347f49ff040968067b50ac35283e4463acd7..0bd9b5e7520dd6c6de641144e72e70b2ccfbfd44 100644 (file)
@@ -598,7 +598,7 @@ static void rds_iw_cong_recv(struct rds_connection *conn,
                to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off);
                BUG_ON(to_copy & 7); /* Must be 64bit aligned. */
 
-               addr = kmap_atomic(frag->f_page, KM_SOFTIRQ0);
+               addr = kmap_atomic(frag->f_page);
 
                src = addr + frag_off;
                dst = (void *)map->m_page_addrs[map_page] + map_off;
@@ -608,7 +608,7 @@ static void rds_iw_cong_recv(struct rds_connection *conn,
                        uncongested |= ~(*src) & *dst;
                        *dst++ = *src++;
                }
-               kunmap_atomic(addr, KM_SOFTIRQ0);
+               kunmap_atomic(addr);
 
                copied += to_copy;
 
@@ -754,8 +754,7 @@ static void rds_iw_process_recv(struct rds_connection *conn,
                        rds_iw_cong_recv(conn, iwinc);
                else {
                        rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr,
-                                         &iwinc->ii_inc, GFP_ATOMIC,
-                                         KM_SOFTIRQ0);
+                                         &iwinc->ii_inc, GFP_ATOMIC);
                        state->ack_next = be64_to_cpu(hdr->h_sequence);
                        state->ack_next_valid = 1;
                }
index bca6761a3ca2f578b1355e670dbb446ad24cd20a..87ff2a8a454b33fa32972bd83b84269cb077a74a 100644 (file)
@@ -79,7 +79,7 @@ static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm,
        rds_message_addref(rm);
 
        rds_recv_incoming(conn, conn->c_laddr, conn->c_faddr, &rm->m_inc,
-                         GFP_KERNEL, KM_USER0);
+                         GFP_KERNEL);
 
        rds_send_drop_acked(conn, be64_to_cpu(rm->m_inc.i_hdr.h_sequence),
                            NULL);
index 7eaba1831f0d522ffbe38e82ce60d3cb80d1065f..ec1d731ecff0e2d103b1933f5997317c2dd1403b 100644 (file)
@@ -704,7 +704,7 @@ void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
                  __be32 saddr);
 void rds_inc_put(struct rds_incoming *inc);
 void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
-                      struct rds_incoming *inc, gfp_t gfp, enum km_type km);
+                      struct rds_incoming *inc, gfp_t gfp);
 int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
                size_t size, int msg_flags);
 void rds_clear_recv_queue(struct rds_sock *rs);
index bc3f8cd6d07063689b37f3fe32e790fc9195a7e9..5c6e9f1320266cf175ed55ea69e3a7c28437ce1b 100644 (file)
@@ -155,7 +155,7 @@ static void rds_recv_incoming_exthdrs(struct rds_incoming *inc, struct rds_sock
  * tell us which roles the addrs in the conn are playing for this message.
  */
 void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
-                      struct rds_incoming *inc, gfp_t gfp, enum km_type km)
+                      struct rds_incoming *inc, gfp_t gfp)
 {
        struct rds_sock *rs = NULL;
        struct sock *sk;
index 78205e25500a5b40d5ec64a59b35c4c07062f62c..6243258f840f0e79dace450b97e3914e1badbacc 100644 (file)
@@ -169,7 +169,6 @@ static void rds_tcp_cong_recv(struct rds_connection *conn,
 struct rds_tcp_desc_arg {
        struct rds_connection *conn;
        gfp_t gfp;
-       enum km_type km;
 };
 
 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,
                        else
                                rds_recv_incoming(conn, conn->c_faddr,
                                                  conn->c_laddr, &tinc->ti_inc,
-                                                 arg->gfp, arg->km);
+                                                 arg->gfp);
 
                        tc->t_tinc_hdr_rem = sizeof(struct rds_header);
                        tc->t_tinc_data_rem = 0;
@@ -272,8 +271,7 @@ out:
 }
 
 /* the caller has to hold the sock lock */
-static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp,
-                            enum km_type km)
+static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp)
 {
        struct rds_tcp_connection *tc = conn->c_transport_data;
        struct socket *sock = tc->t_sock;
@@ -283,7 +281,6 @@ static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp,
        /* It's like glib in the kernel! */
        arg.conn = conn;
        arg.gfp = gfp;
-       arg.km = km;
        desc.arg.data = &arg;
        desc.error = 0;
        desc.count = 1; /* give more than one skb per call */
@@ -311,7 +308,7 @@ int rds_tcp_recv(struct rds_connection *conn)
        rdsdebug("recv worker conn %p tc %p sock %p\n", conn, tc, sock);
 
        lock_sock(sock->sk);
-       ret = rds_tcp_read_sock(conn, GFP_KERNEL, KM_USER0);
+       ret = rds_tcp_read_sock(conn, GFP_KERNEL);
        release_sock(sock->sk);
 
        return ret;
@@ -336,7 +333,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes)
        ready = tc->t_orig_data_ready;
        rds_tcp_stats_inc(s_tcp_data_ready_calls);
 
-       if (rds_tcp_read_sock(conn, GFP_ATOMIC, KM_SOFTIRQ0) == -ENOMEM)
+       if (rds_tcp_read_sock(conn, GFP_ATOMIC) == -ENOMEM)
                queue_delayed_work(rds_wq, &conn->c_recv_w, 0);
 out:
        read_unlock_bh(&sk->sk_callback_lock);