]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: eliminate redundant locking
authorJon Paul Maloy <jon.maloy@ericsson.com>
Wed, 12 Mar 2014 15:31:11 +0000 (11:31 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Mar 2014 19:53:49 +0000 (15:53 -0400)
commit99dd8e6bb75a5ac41f23d140beadee83e36685d5
treef7ae25914a547b93851fc7aef94fc2daf601cc95
parent46205173624b0d8e489cb94ca86d0a3fb3da5cd8
tipc: eliminate redundant locking

The three functions tipc_portimportance(), tipc_portunreliable() and
tipc_portunreturnable() and their corresponding tipc_set* functions,
are all grabbing port_lock when accessing the targeted port. This is
unnecessary in the current code, since these calls only are made from
within socket downcalls, already protected by sock_lock.

We remove the redundant locking. Also, since the functions now become
trivial one-liners, we move them to port.h and make them inline.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/port.c
net/tipc/port.h
net/tipc/socket.c