Commit f643776e authored by David S. Miller's avatar David S. Miller

team: Revert previous two changes.

I didn't notice that these were superceded by a more uptodate
version of the changes.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d8dbd96e
...@@ -61,11 +61,8 @@ static void ab_port_leave(struct team *team, struct team_port *port) ...@@ -61,11 +61,8 @@ static void ab_port_leave(struct team *team, struct team_port *port)
static int ab_active_port_get(struct team *team, struct team_gsetter_ctx *ctx) static int ab_active_port_get(struct team *team, struct team_gsetter_ctx *ctx)
{ {
struct team_port *active_port; if (ab_priv(team)->active_port)
ctx->data.u32_val = ab_priv(team)->active_port->dev->ifindex;
active_port = rcu_access_pointer(ab_priv(team)->active_port);
if (active_port)
ctx->data.u32_val = active_port->dev->ifindex;
else else
ctx->data.u32_val = 0; ctx->data.u32_val = 0;
return 0; return 0;
......
...@@ -96,8 +96,8 @@ static void lb_tx_hash_to_port_mapping_null_port(struct team *team, ...@@ -96,8 +96,8 @@ static void lb_tx_hash_to_port_mapping_null_port(struct team *team,
struct lb_port_mapping *pm; struct lb_port_mapping *pm;
pm = &lb_priv->ex->tx_hash_to_port_mapping[i]; pm = &lb_priv->ex->tx_hash_to_port_mapping[i];
if (rcu_access_pointer(pm->port) == port) { if (pm->port == port) {
RCU_INIT_POINTER(pm->port, NULL); rcu_assign_pointer(pm->port, NULL);
team_option_inst_set_change(pm->opt_inst_info); team_option_inst_set_change(pm->opt_inst_info);
changed = true; changed = true;
} }
...@@ -292,7 +292,7 @@ static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx) ...@@ -292,7 +292,7 @@ static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx)
if (lb_priv->ex->orig_fprog) { if (lb_priv->ex->orig_fprog) {
/* Clear old filter data */ /* Clear old filter data */
__fprog_destroy(lb_priv->ex->orig_fprog); __fprog_destroy(lb_priv->ex->orig_fprog);
sk_unattached_filter_destroy(rcu_access_pointer(lb_priv->fp)); sk_unattached_filter_destroy(lb_priv->fp);
} }
rcu_assign_pointer(lb_priv->fp, fp); rcu_assign_pointer(lb_priv->fp, fp);
...@@ -303,11 +303,9 @@ static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx) ...@@ -303,11 +303,9 @@ static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx)
static int lb_tx_method_get(struct team *team, struct team_gsetter_ctx *ctx) static int lb_tx_method_get(struct team *team, struct team_gsetter_ctx *ctx)
{ {
struct lb_priv *lb_priv = get_lb_priv(team); struct lb_priv *lb_priv = get_lb_priv(team);
lb_select_tx_port_func_t *func;
char *name; char *name;
func = rcu_access_pointer(lb_priv->select_tx_port_func); name = lb_select_tx_port_get_name(lb_priv->select_tx_port_func);
name = lb_select_tx_port_get_name(func);
BUG_ON(!name); BUG_ON(!name);
ctx->data.str_val = name; ctx->data.str_val = name;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment