Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72983
b: refs/heads/master
c: d57a921
h: refs/heads/master
i:
  72981: ccf8b57
  72979: 1e38f55
  72975: 8c58cdc
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Nov 1, 2007
1 parent 354f9ac commit c885b64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 1a2ee93d281d00cc6e2db1c306032a105d2c9474
refs/heads/master: d57a9212e00779181d8d820887dcab3e9d529194
6 changes: 4 additions & 2 deletions trunk/net/core/net_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ static DEFINE_MUTEX(net_mutex);

LIST_HEAD(net_namespace_list);

static struct kmem_cache *net_cachep;

struct net init_net;
EXPORT_SYMBOL_GPL(init_net);

Expand Down Expand Up @@ -59,6 +57,8 @@ static __net_init int setup_net(struct net *net)
}

#ifdef CONFIG_NET_NS
static struct kmem_cache *net_cachep;

static struct net *net_alloc(void)
{
return kmem_cache_zalloc(net_cachep, GFP_KERNEL);
Expand Down Expand Up @@ -167,9 +167,11 @@ static int __init net_ns_init(void)
int err;

printk(KERN_INFO "net_namespace: %zd bytes\n", sizeof(struct net));
#ifdef CONFIG_NET_NS
net_cachep = kmem_cache_create("net_namespace", sizeof(struct net),
SMP_CACHE_BYTES,
SLAB_PANIC, NULL);
#endif
mutex_lock(&net_mutex);
err = setup_net(&init_net);

Expand Down

0 comments on commit c885b64

Please sign in to comment.