summaryrefslogtreecommitdiff
path: root/net/tipc/port.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2014-08-22 22:09:12 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-08-23 18:18:34 (GMT)
commit739f5e4efc82c4cb6b5201cbed337b6ff663bf19 (patch)
tree8364fc3cd87910c2aa34b4f6b49ea25e3cf1f720 /net/tipc/port.c
parentdadebc00299a19dc4639ba7192db937e31b81eb2 (diff)
downloadlinux-739f5e4efc82c4cb6b5201cbed337b6ff663bf19.tar.xz
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.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 2f96719..1074ccb 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)
{