• Jon Paul Maloy's avatar
    tipc: remove port_lock · 6c9808ce
    Jon Paul Maloy authored
    In previous commits we have reduced usage of port_lock to a minimum,
    and complemented it with usage of bh_lock_sock() at the remaining
    locations. The purpose has been to remove this lock altogether, since
    it largely duplicates the role of bh_lock_sock. We are now ready to do
    this.
    
    However, we still need to protect the BH callers from inadvertent
    release of the socket while they hold a reference to it. We do this by
    replacing port_lock by a combination of a rw-lock protecting the
    reference table as such, and updating the socket reference counter while
    the socket is referenced from BH. This technique is more standard and
    comprehensible than the previous approach, and turns out to have a
    positive effect on overall performance.
    Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
    Reviewed-by: default avatarErik Hugne <erik.hugne@ericsson.com>
    Reviewed-by: default avatarYing Xue <ying.xue@windriver.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6c9808ce
ref.h 2.23 KB