]> err.no Git - linux-2.6/commitdiff
[PATCH] net/rxrpc: use list_move()
authorAkinobu Mita <mita@miraclelinux.com>
Mon, 26 Jun 2006 07:24:40 +0000 (00:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 16:58:17 +0000 (09:58 -0700)
This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B) under net/rxrpc.

Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
net/rxrpc/call.c
net/rxrpc/connection.c
net/rxrpc/krxsecd.c

index c4aeb7d40266f84d84c03023f482102d70d6b3df..d07122b57e0d871af7c2d73c17049aaeabf426c6 100644 (file)
@@ -1098,8 +1098,7 @@ static void rxrpc_call_receive_data_packet(struct rxrpc_call *call,
 
                call->app_ready_seq = pmsg->seq;
                call->app_ready_qty += pmsg->dsize;
-               list_del_init(&pmsg->link);
-               list_add_tail(&pmsg->link, &call->app_readyq);
+               list_move_tail(&pmsg->link, &call->app_readyq);
        }
 
        /* see if we've got the last packet yet */
index 0e0a4553499f751c21d5fb1978ef5f8c8cac097b..573b572f8f91dfceda7d60a3fb67b8dc8588f0f1 100644 (file)
@@ -402,8 +402,7 @@ void rxrpc_put_connection(struct rxrpc_connection *conn)
 
        /* move to graveyard queue */
        _debug("burying connection: {%08x}", ntohl(conn->conn_id));
-       list_del(&conn->link);
-       list_add_tail(&conn->link, &peer->conn_graveyard);
+       list_move_tail(&conn->link, &peer->conn_graveyard);
 
        rxrpc_krxtimod_add_timer(&conn->timeout, rxrpc_conn_timeout * HZ);
 
index 1aadd026d3542151e0eeb8b6c99f35a24c6779e0..cea4eb5e2497a7c6e89234ef0a7e60c8bc863130 100644 (file)
@@ -160,8 +160,7 @@ void rxrpc_krxsecd_clear_transport(struct rxrpc_transport *trans)
        list_for_each_safe(_p, _n, &rxrpc_krxsecd_initmsgq) {
                msg = list_entry(_p, struct rxrpc_message, link);
                if (msg->trans == trans) {
-                       list_del(&msg->link);
-                       list_add_tail(&msg->link, &tmp);
+                       list_move_tail(&msg->link, &tmp);
                        atomic_dec(&rxrpc_krxsecd_qcount);
                }
        }