Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[linux-2.6-microblaze.git] / net / xdp / xdp_umem.c
index 773326f..a264cf2 100644 (file)
@@ -32,14 +32,9 @@ void xdp_del_sk_umem(struct xdp_umem *umem, struct xdp_sock *xs)
 {
        unsigned long flags;
 
-       if (xs->dev) {
-               spin_lock_irqsave(&umem->xsk_list_lock, flags);
-               list_del_rcu(&xs->list);
-               spin_unlock_irqrestore(&umem->xsk_list_lock, flags);
-
-               if (umem->zc)
-                       synchronize_net();
-       }
+       spin_lock_irqsave(&umem->xsk_list_lock, flags);
+       list_del_rcu(&xs->list);
+       spin_unlock_irqrestore(&umem->xsk_list_lock, flags);
 }
 
 /* The umem is stored both in the _rx struct and the _tx struct as we do
@@ -68,12 +63,9 @@ struct xdp_umem *xdp_get_umem_from_qid(struct net_device *dev,
 
 static void xdp_clear_umem_at_qid(struct net_device *dev, u16 queue_id)
 {
-       /* Zero out the entry independent on how many queues are configured
-        * at this point in time, as it might be used in the future.
-        */
-       if (queue_id < dev->num_rx_queues)
+       if (queue_id < dev->real_num_rx_queues)
                dev->_rx[queue_id].umem = NULL;
-       if (queue_id < dev->num_tx_queues)
+       if (queue_id < dev->real_num_tx_queues)
                dev->_tx[queue_id].umem = NULL;
 }