diff options
Diffstat (limited to 'drivers/scsi/libfc/fc_frame.c')
-rw-r--r-- | drivers/scsi/libfc/fc_frame.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_frame.c b/drivers/scsi/libfc/fc_frame.c index 79c956501bd..6da01c61696 100644 --- a/drivers/scsi/libfc/fc_frame.c +++ b/drivers/scsi/libfc/fc_frame.c | |||
@@ -58,12 +58,13 @@ struct fc_frame *_fc_frame_alloc(size_t len) | |||
58 | 58 | ||
59 | WARN_ON((len % sizeof(u32)) != 0); | 59 | WARN_ON((len % sizeof(u32)) != 0); |
60 | len += sizeof(struct fc_frame_header); | 60 | len += sizeof(struct fc_frame_header); |
61 | skb = dev_alloc_skb(len + FC_FRAME_HEADROOM + FC_FRAME_TAILROOM); | 61 | skb = alloc_skb_fclone(len + FC_FRAME_HEADROOM + FC_FRAME_TAILROOM + |
62 | NET_SKB_PAD, GFP_ATOMIC); | ||
62 | if (!skb) | 63 | if (!skb) |
63 | return NULL; | 64 | return NULL; |
65 | skb_reserve(skb, NET_SKB_PAD + FC_FRAME_HEADROOM); | ||
64 | fp = (struct fc_frame *) skb; | 66 | fp = (struct fc_frame *) skb; |
65 | fc_frame_init(fp); | 67 | fc_frame_init(fp); |
66 | skb_reserve(skb, FC_FRAME_HEADROOM); | ||
67 | skb_put(skb, len); | 68 | skb_put(skb, len); |
68 | return fp; | 69 | return fp; |
69 | } | 70 | } |