diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2014-08-23 00:09:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-23 20:18:34 +0200 |
commit | 739f5e4efc82c4cb6b5201cbed337b6ff663bf19 (patch) | |
tree | 8364fc3cd87910c2aa34b4f6b49ea25e3cf1f720 /net/tipc/port.c | |
parent | tipc: eliminate port_connect()/port_disconnect() functions (diff) | |
download | linux-739f5e4efc82c4cb6b5201cbed337b6ff663bf19.tar.xz linux-739f5e4efc82c4cb6b5201cbed337b6ff663bf19.zip |
tipc: redefine message acknowledge function
The function tipc_acknowledge() is a remnant from the obsolete native
API. Currently, it grabs port_lock, before building an acknowledge
message and sending it to the peer.
Since all access to socket members now is protected by the socket lock,
it has become unnecessary to grab port_lock here.
In this commit, we remove the usage of port_lock, simplify the
function, and move it to socket.c, renaming it to tipc_sk_send_ack().
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r-- | net/tipc/port.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c index 2f96719a3514..1074ccb0c76f 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c @@ -221,28 +221,6 @@ void tipc_port_reinit(void) spin_unlock_bh(&tipc_port_list_lock); } -void tipc_acknowledge(u32 ref, u32 ack) -{ - struct tipc_port *p_ptr; - struct sk_buff *buf = NULL; - struct tipc_msg *msg; - - p_ptr = tipc_port_lock(ref); - if (!p_ptr) - return; - if (p_ptr->connected) - buf = tipc_msg_create(CONN_MANAGER, CONN_ACK, INT_H_SIZE, - 0, tipc_port_peernode(p_ptr), - tipc_own_addr, tipc_port_peerport(p_ptr), - p_ptr->ref, TIPC_OK); - tipc_port_unlock(p_ptr); - if (!buf) - return; - msg = buf_msg(buf); - msg_set_msgcnt(msg, ack); - tipc_link_xmit(buf, msg_destnode(msg), msg_link_selector(msg)); -} - int tipc_publish(struct tipc_port *p_ptr, unsigned int scope, struct tipc_name_seq const *seq) { |