net: two vzalloc() cleanups
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 19 Dec 2011 21:01:38 +0000 (16:01 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Dec 2011 21:01:38 +0000 (16:01 -0500)
We can use vzalloc() helper now instead of __vmalloc() trick

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nf_conntrack_core.c
net/tipc/ref.c

index 32279dcd03cf522d56a5aabb693f931e5191d207..deeef74e775f6d15754bce80578997f24f436342 100644 (file)
@@ -1342,8 +1342,7 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls)
                                        get_order(sz));
        if (!hash) {
                printk(KERN_WARNING "nf_conntrack: falling back to vmalloc.\n");
-               hash = __vmalloc(sz, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO,
-                                PAGE_KERNEL);
+               hash = vzalloc(sz);
        }
 
        if (hash && nulls)
index 83116892528b448c0097ca3ae432e16995db8810..9e37b7812c3c361fa1a904b184ec98f74d4ce9e8 100644 (file)
@@ -110,8 +110,7 @@ int tipc_ref_table_init(u32 requested_size, u32 start)
 
        /* allocate table & mark all entries as uninitialized */
 
-       table = __vmalloc(actual_size * sizeof(struct reference),
-                         GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL);
+       table = vzalloc(actual_size * sizeof(struct reference));
        if (table == NULL)
                return -ENOMEM;