]> git.baikalelectronics.ru Git - kernel.git/commit
tun: avoid unnecessary READ_ONCE in tun_net_xmit
authorWillem de Bruijn <willemb@google.com>
Wed, 6 Dec 2017 03:11:17 +0000 (22:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Dec 2017 20:09:13 +0000 (15:09 -0500)
commit0b41691f6a9d34eb75b020295d7456f58fac8640
tree3e7b0e2a412e37f7a5a4e9000c496de3ecb9a633
parent76a60e237ea448338569550cc2e7f1ed8029d3b0
tun: avoid unnecessary READ_ONCE in tun_net_xmit

The statement no longer serves a purpose.

Commit 90ab4bd37e7c ("tuntap: Fix for a race in accessing numqueues")
added the ACCESS_ONCE to avoid a race condition with skb_queue_len.

Commit d86a8db3ca03 ("tuntap: remove unnecessary sk_receive_queue
length check during xmit") removed the affected skb_queue_len check.

Commit 5c57ce49c853 ("tun: add eBPF based queue selection method")
split the function, reading the field a second time in the callee.
The temp variable is now only read once, so just remove it.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c