提交 e1f78ecd 编写于 作者: I Ido Schimmel 提交者: David S. Miller

mlxsw: spectrum: Remove unnecessary RCU read-side critical section

Since commit 7d8e8f34 ("mlxsw: core: Increase scope of RCU read-side
critical section"), all Rx handlers are called from an RCU read-side
critical section.

Remove the unnecessary rcu_read_lock() / rcu_read_unlock().
Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
Reviewed-by: NJiri Pirko <jiri@nvidia.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5ab6dc9f
......@@ -2225,15 +2225,12 @@ void mlxsw_sp_sample_receive(struct mlxsw_sp *mlxsw_sp, struct sk_buff *skb,
goto out;
}
rcu_read_lock();
sample = rcu_dereference(mlxsw_sp_port->sample);
if (!sample)
goto out_unlock;
goto out;
md.trunc_size = sample->truncate ? sample->trunc_size : skb->len;
md.in_ifindex = mlxsw_sp_port->dev->ifindex;
psample_sample_packet(sample->psample_group, skb, sample->rate, &md);
out_unlock:
rcu_read_unlock();
out:
consume_skb(skb);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册