aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow.c
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-05-05 14:32:17 -0400
committerPravin B Shelar <pshelar@nicira.com>2014-05-22 19:27:34 -0400
commitbb6f9a708d4067713afae2e9eb2637f6b4c01ecb (patch)
tree2df408598e97bcb98c9204c62addb5b187a48153 /net/openvswitch/flow.c
parentbe52c9e96a6657d117bb0ec6e11438fb246af5c7 (diff)
openvswitch: Clarify locking.
Remove unnecessary locking from functions that are always called with appropriate locking. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Thomas Graf <tgraf@redhat.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Diffstat (limited to 'net/openvswitch/flow.c')
-rw-r--r--net/openvswitch/flow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index 6d8d2da0a8ec..1019fc1db06e 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -122,6 +122,7 @@ unlock:
122 spin_unlock(&stats->lock); 122 spin_unlock(&stats->lock);
123} 123}
124 124
125/* Called with ovs_mutex. */
125void ovs_flow_stats_get(struct sw_flow *flow, struct ovs_flow_stats *ovs_stats, 126void ovs_flow_stats_get(struct sw_flow *flow, struct ovs_flow_stats *ovs_stats,
126 unsigned long *used, __be16 *tcp_flags) 127 unsigned long *used, __be16 *tcp_flags)
127{ 128{
@@ -132,7 +133,7 @@ void ovs_flow_stats_get(struct sw_flow *flow, struct ovs_flow_stats *ovs_stats,
132 memset(ovs_stats, 0, sizeof(*ovs_stats)); 133 memset(ovs_stats, 0, sizeof(*ovs_stats));
133 134
134 for_each_node(node) { 135 for_each_node(node) {
135 struct flow_stats *stats = rcu_dereference(flow->stats[node]); 136 struct flow_stats *stats = ovsl_dereference(flow->stats[node]);
136 137
137 if (stats) { 138 if (stats) {
138 /* Local CPU may write on non-local stats, so we must 139 /* Local CPU may write on non-local stats, so we must