diff options
author | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:37:51 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:37:51 -0400 |
commit | 02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1 (patch) | |
tree | 04ef573cd4de095c500c9fc3477f4278c0b36300 /drivers/block/aoe/aoecmd.c | |
parent | 7487a2245b8841c77ba9db406cf99a483b9334e9 (diff) | |
parent | 5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff) |
Merge branch 'linux-2.6'
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 | ||