diff options
Diffstat (limited to 'drivers/block/aoe/aoecmd.c')
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 1a6aeac5a1c3..01fbdd38e3be 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -194,15 +194,15 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff **tail) | |||
194 | sl = sl_tail = NULL; | 194 | sl = sl_tail = NULL; |
195 | 195 | ||
196 | read_lock(&dev_base_lock); | 196 | read_lock(&dev_base_lock); |
197 | for (ifp = dev_base; ifp; dev_put(ifp), ifp = ifp->next) { | 197 | for_each_netdev(ifp) { |
198 | dev_hold(ifp); | 198 | dev_hold(ifp); |
199 | if (!is_aoe_netif(ifp)) | 199 | if (!is_aoe_netif(ifp)) |
200 | continue; | 200 | goto cont; |
201 | 201 | ||
202 | skb = new_skb(sizeof *h + sizeof *ch); | 202 | skb = new_skb(sizeof *h + sizeof *ch); |
203 | if (skb == NULL) { | 203 | if (skb == NULL) { |
204 | printk(KERN_INFO "aoe: skb alloc failure\n"); | 204 | printk(KERN_INFO "aoe: skb alloc failure\n"); |
205 | continue; | 205 | goto cont; |
206 | } | 206 | } |
207 | skb_put(skb, sizeof *h + sizeof *ch); | 207 | skb_put(skb, sizeof *h + sizeof *ch); |
208 | skb->dev = ifp; | 208 | skb->dev = ifp; |
@@ -221,6 +221,8 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff **tail) | |||
221 | 221 | ||
222 | skb->next = sl; | 222 | skb->next = sl; |
223 | sl = skb; | 223 | sl = skb; |
224 | cont: | ||
225 | dev_put(ifp); | ||
224 | } | 226 | } |
225 | read_unlock(&dev_base_lock); | 227 | read_unlock(&dev_base_lock); |
226 | 228 | ||