add doit.sh
[openwrt/staging/blogic.git] / patches / lib-rhashtable.patch
1
2 --- a/compat/lib-rhashtable.c
3 +++ b/compat/lib-rhashtable.c
4 @@ -175,10 +175,11 @@ static struct bucket_table *bucket_table
5 int i;
6
7 size = sizeof(*tbl) + nbuckets * sizeof(tbl->buckets[0]);
8 - if (gfp != GFP_KERNEL)
9 + if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER) ||
10 + gfp != GFP_KERNEL)
11 tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY);
12 - else
13 - tbl = kvzalloc(size, gfp);
14 + if (tbl == NULL && gfp == GFP_KERNEL)
15 + tbl = vzalloc(size);
16
17 size = nbuckets;
18