diff options
author | Ying Xue <ying.xue@windriver.com> | 2014-04-21 06:55:45 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-23 05:17:52 +0400 |
commit | f8322dfce5766c8e26d9224cbcaf6fdc0b2eb04d (patch) | |
tree | 9631ad1e81d63e7199350788f997733a5eb873e9 /net/tipc/bearer.h | |
parent | f97e455abf0d83b7d69da295163db18e3ebb4d8b (diff) | |
download | linux-f8322dfce5766c8e26d9224cbcaf6fdc0b2eb04d.tar.xz |
tipc: convert bearer_list to RCU list
Convert bearer_list to RCU list. It's protected by RTNL lock on
update side, and RCU read lock is applied to read side.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Tested-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.h')
-rw-r--r-- | net/tipc/bearer.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index ba48145e871d..b67b7ea4cc36 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h @@ -113,6 +113,7 @@ struct tipc_media { * @name: bearer name (format = media:interface) * @media: ptr to media structure associated with bearer * @bcast_addr: media address used in broadcasting + * @rcu: rcu struct for tipc_bearer * @priority: default link priority for bearer * @window: default window size for bearer * @tolerance: default link tolerance for bearer @@ -133,6 +134,7 @@ struct tipc_bearer { char name[TIPC_MAX_BEARER_NAME]; struct tipc_media *media; struct tipc_media_addr bcast_addr; + struct rcu_head rcu; u32 priority; u32 window; u32 tolerance; @@ -150,7 +152,7 @@ struct tipc_bearer_names { struct tipc_link; -extern struct tipc_bearer *bearer_list[]; +extern struct tipc_bearer __rcu *bearer_list[]; /* * TIPC routines available to supported media types |