summaryrefslogtreecommitdiff
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-02 09:12:54 +0300
committerJeff Garzik <jgarzik@pobox.com>2006-02-02 09:12:54 +0300
commit18ee3610040a4c008ce08a40a5dd025241cc7e97 (patch)
tree32a996a5123726b63c31a1522f230933fb967a32 /net/core/skbuff.c
parente4e7b89280d1d666e2c09e5ad36cf071796c4c7e (diff)
parentb4103333d7904310d34de18d85e51e3d74f00a3b (diff)
downloadlinux-18ee3610040a4c008ce08a40a5dd025241cc7e97.tar.xz
Merge branch 'master'
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index d0732e9c8560..6766f118f070 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -135,13 +135,15 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
int fclone)
{
+ kmem_cache_t *cache;
struct skb_shared_info *shinfo;
struct sk_buff *skb;
u8 *data;
+ cache = fclone ? skbuff_fclone_cache : skbuff_head_cache;
+
/* Get the HEAD */
- skb = kmem_cache_alloc(fclone ? skbuff_fclone_cache : skbuff_head_cache,
- gfp_mask & ~__GFP_DMA);
+ skb = kmem_cache_alloc(cache, gfp_mask & ~__GFP_DMA);
if (!skb)
goto out;
@@ -180,7 +182,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
out:
return skb;
nodata:
- kmem_cache_free(skbuff_head_cache, skb);
+ kmem_cache_free(cache, skb);
skb = NULL;
goto out;
}