]> Pileus Git - ~andy/linux/blobdiff - drivers/net/xen-netfront.c
xen-netfront: fix missing rx_refill_timer when allocate memory failed
[~andy/linux] / drivers / net / xen-netfront.c
index dd1011e55cb598096ef7c2ad64981a2572b760d7..5bd20d99acc83e7878500efffb2a2eb28b0ed082 100644 (file)
@@ -277,12 +277,13 @@ static void xennet_alloc_rx_buffers(struct net_device *dev)
                if (!page) {
                        kfree_skb(skb);
 no_skb:
-                       /* Any skbuffs queued for refill? Force them out. */
-                       if (i != 0)
-                               goto refill;
                        /* Could not allocate any skbuffs. Try again later. */
                        mod_timer(&np->rx_refill_timer,
                                  jiffies + (HZ/10));
+
+                       /* Any skbuffs queued for refill? Force them out. */
+                       if (i != 0)
+                               goto refill;
                        break;
                }