Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23970
b: refs/heads/master
c: 5dc401e
h: refs/heads/master
v: v3
  • Loading branch information
Ed L. Cashin authored and Greg Kroah-Hartman committed Mar 24, 2006
1 parent 16a3716 commit ccf7972
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c6f3fcac03a16c901ee5acd58100bff963add6d
refs/heads/master: 5dc401ee74c5d6a24867acd8302c55da9ae4f0ce
22 changes: 5 additions & 17 deletions trunk/drivers/block/aoe/aoenet.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,6 @@ mac_addr(char addr[6])
return __be64_to_cpu(n);
}

static struct sk_buff *
skb_check(struct sk_buff *skb)
{
if (skb_is_nonlinear(skb))
if ((skb = skb_share_check(skb, GFP_ATOMIC)))
if (skb_linearize(skb, GFP_ATOMIC) < 0) {
dev_kfree_skb(skb);
return NULL;
}
return skb;
}

void
aoenet_xmit(struct sk_buff *sl)
{
Expand All @@ -125,14 +113,14 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
struct aoe_hdr *h;
u32 n;

skb = skb_check(skb);
if (!skb)
skb = skb_share_check(skb, GFP_ATOMIC);
if (skb == NULL)
return 0;

if (skb_is_nonlinear(skb))
if (skb_linearize(skb, GFP_ATOMIC) < 0)
goto exit;
if (!is_aoe_netif(ifp))
goto exit;

//skb->len += ETH_HLEN; /* (1) */
skb_push(skb, ETH_HLEN); /* (1) */

h = (struct aoe_hdr *) skb->mac.raw;
Expand Down

0 comments on commit ccf7972

Please sign in to comment.