diff options
author | Li RongQing <lirongqing@baidu.com> | 2018-12-06 03:28:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-06 15:15:53 -0500 |
commit | 5c327f673d2f134ac01c068b511c6ab816b4b41c (patch) | |
tree | 97164dfb9799a6cf4e1cfeb6c6d35cd0d60efb8f | |
parent | 83b1bc122cab87547731a154db5feec5b9d4807c (diff) |
tun: remove unnecessary check in tun_flow_update
caller has guaranted that rxhash is not zero
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/tun.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index d0745dc81976..6760b86547df 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -529,10 +529,7 @@ static void tun_flow_update(struct tun_struct *tun, u32 rxhash, | |||
529 | unsigned long delay = tun->ageing_time; | 529 | unsigned long delay = tun->ageing_time; |
530 | u16 queue_index = tfile->queue_index; | 530 | u16 queue_index = tfile->queue_index; |
531 | 531 | ||
532 | if (!rxhash) | 532 | head = &tun->flows[tun_hashfn(rxhash)]; |
533 | return; | ||
534 | else | ||
535 | head = &tun->flows[tun_hashfn(rxhash)]; | ||
536 | 533 | ||
537 | rcu_read_lock(); | 534 | rcu_read_lock(); |
538 | 535 | ||