Skip to content

Commit

Permalink
[PATCH] net/rxrpc: use list_move()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Jun 26, 2006
1 parent 1bfba4e commit a842ef2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions net/rxrpc/call.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions net/rxrpc/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 1 addition & 2 deletions net/rxrpc/krxsecd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit a842ef2

Please sign in to comment.