aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/aoe/aoenet.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
index 4be976940f69..fdff774b8ab9 100644
--- a/drivers/block/aoe/aoenet.c
+++ b/drivers/block/aoe/aoenet.c
@@ -92,18 +92,6 @@ mac_addr(char addr[6])
92 return __be64_to_cpu(n); 92 return __be64_to_cpu(n);
93} 93}
94 94
95static struct sk_buff *
96skb_check(struct sk_buff *skb)
97{
98 if (skb_is_nonlinear(skb))
99 if ((skb = skb_share_check(skb, GFP_ATOMIC)))
100 if (skb_linearize(skb, GFP_ATOMIC) < 0) {
101 dev_kfree_skb(skb);
102 return NULL;
103 }
104 return skb;
105}
106
107void 95void
108aoenet_xmit(struct sk_buff *sl) 96aoenet_xmit(struct sk_buff *sl)
109{ 97{
@@ -125,14 +113,14 @@ aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
125 struct aoe_hdr *h; 113 struct aoe_hdr *h;
126 u32 n; 114 u32 n;
127 115
128 skb = skb_check(skb); 116 skb = skb_share_check(skb, GFP_ATOMIC);
129 if (!skb) 117 if (skb == NULL)
130 return 0; 118 return 0;
131 119 if (skb_is_nonlinear(skb))
120 if (skb_linearize(skb, GFP_ATOMIC) < 0)
121 goto exit;
132 if (!is_aoe_netif(ifp)) 122 if (!is_aoe_netif(ifp))
133 goto exit; 123 goto exit;
134
135 //skb->len += ETH_HLEN; /* (1) */
136 skb_push(skb, ETH_HLEN); /* (1) */ 124 skb_push(skb, ETH_HLEN); /* (1) */
137 125
138 h = (struct aoe_hdr *) skb->mac.raw; 126 h = (struct aoe_hdr *) skb->mac.raw;