spin_unlock_bh(&tun->lock);
 }
 
-static void tun_flow_update(struct tun_struct *tun, struct sk_buff *skb,
+static void tun_flow_update(struct tun_struct *tun, u32 rxhash,
                            u16 queue_index)
 {
        struct hlist_head *head;
        struct tun_flow_entry *e;
        unsigned long delay = tun->ageing_time;
-       u32 rxhash = skb_get_rxhash(skb);
 
        if (!rxhash)
                return;
        int copylen;
        bool zerocopy = false;
        int err;
+       u32 rxhash;
 
        if (!(tun->flags & TUN_NO_PI)) {
                if ((len -= sizeof(pi)) > total_len)
                skb_shinfo(skb)->tx_flags |= SKBTX_DEV_ZEROCOPY;
        }
 
+       rxhash = skb_get_rxhash(skb);
        netif_rx_ni(skb);
 
        tun->dev->stats.rx_packets++;
        tun->dev->stats.rx_bytes += len;
 
-       tun_flow_update(tun, skb, tfile->queue_index);
+       tun_flow_update(tun, rxhash, tfile->queue_index);
        return total_len;
 }