Commit a842ef29 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

[PATCH] net/rxrpc: use list_move()

This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B) under net/rxrpc.
Acked-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAkinobu Mita <mita@miraclelinux.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1bfba4e8
...@@ -1098,8 +1098,7 @@ static void rxrpc_call_receive_data_packet(struct rxrpc_call *call, ...@@ -1098,8 +1098,7 @@ static void rxrpc_call_receive_data_packet(struct rxrpc_call *call,
call->app_ready_seq = pmsg->seq; call->app_ready_seq = pmsg->seq;
call->app_ready_qty += pmsg->dsize; call->app_ready_qty += pmsg->dsize;
list_del_init(&pmsg->link); list_move_tail(&pmsg->link, &call->app_readyq);
list_add_tail(&pmsg->link, &call->app_readyq);
} }
/* see if we've got the last packet yet */ /* see if we've got the last packet yet */
......
...@@ -402,8 +402,7 @@ void rxrpc_put_connection(struct rxrpc_connection *conn) ...@@ -402,8 +402,7 @@ void rxrpc_put_connection(struct rxrpc_connection *conn)
/* move to graveyard queue */ /* move to graveyard queue */
_debug("burying connection: {%08x}", ntohl(conn->conn_id)); _debug("burying connection: {%08x}", ntohl(conn->conn_id));
list_del(&conn->link); list_move_tail(&conn->link, &peer->conn_graveyard);
list_add_tail(&conn->link, &peer->conn_graveyard);
rxrpc_krxtimod_add_timer(&conn->timeout, rxrpc_conn_timeout * HZ); rxrpc_krxtimod_add_timer(&conn->timeout, rxrpc_conn_timeout * HZ);
......
...@@ -160,8 +160,7 @@ void rxrpc_krxsecd_clear_transport(struct rxrpc_transport *trans) ...@@ -160,8 +160,7 @@ void rxrpc_krxsecd_clear_transport(struct rxrpc_transport *trans)
list_for_each_safe(_p, _n, &rxrpc_krxsecd_initmsgq) { list_for_each_safe(_p, _n, &rxrpc_krxsecd_initmsgq) {
msg = list_entry(_p, struct rxrpc_message, link); msg = list_entry(_p, struct rxrpc_message, link);
if (msg->trans == trans) { if (msg->trans == trans) {
list_del(&msg->link); list_move_tail(&msg->link, &tmp);
list_add_tail(&msg->link, &tmp);
atomic_dec(&rxrpc_krxsecd_qcount); atomic_dec(&rxrpc_krxsecd_qcount);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment