git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
block
/
aoe
/
aoenet.c
diff --git
a/drivers/block/aoe/aoenet.c
b/drivers/block/aoe/aoenet.c
index
9e6f51c
..
fdff774
100644
(file)
--- a/
drivers/block/aoe/aoenet.c
+++ b/
drivers/block/aoe/aoenet.c
@@
-92,18
+92,6
@@
mac_addr(char addr[6])
return __be64_to_cpu(n);
}
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)
{
void
aoenet_xmit(struct sk_buff *sl)
{
@@
-120,19
+108,19
@@
aoenet_xmit(struct sk_buff *sl)
* (1) len doesn't include the header by default. I want this.
*/
static int
* (1) len doesn't include the header by default. I want this.
*/
static int
-aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt)
+aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt
, struct net_device *orig_dev
)
{
struct aoe_hdr *h;
u32 n;
{
struct aoe_hdr *h;
u32 n;
- skb = skb_
check(skb
);
- if (
!skb
)
+ skb = skb_
share_check(skb, GFP_ATOMIC
);
+ if (
skb == NULL
)
return 0;
return 0;
-
+ if (skb_is_nonlinear(skb))
+ if (skb_linearize(skb, GFP_ATOMIC) < 0)
+ goto exit;
if (!is_aoe_netif(ifp))
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;
skb_push(skb, ETH_HLEN); /* (1) */
h = (struct aoe_hdr *) skb->mac.raw;