diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2018-09-17 23:31:37 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-09-19 11:06:09 +0200 |
commit | 72c92e416df1a9ccdfc59398d388a5f7b77235fc (patch) | |
tree | 100370a6c50537e5a8f3135b9e257a1fb8000af0 /patches | |
parent | ab3fd3b9a801a9faa2619e2e65207e736f859a6d (diff) |
header: Add kvzalloc()
This adds the kvzalloc() function and allows it to remove the
lib-rhashtable.patch patch.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[fix commit message kzalloc -> kvzalloc]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/lib-rhashtable.patch | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/patches/lib-rhashtable.patch b/patches/lib-rhashtable.patch deleted file mode 100644 index 2e91f8d9..00000000 --- a/patches/lib-rhashtable.patch +++ /dev/null @@ -1,18 +0,0 @@ - ---- a/compat/lib-rhashtable.c -+++ b/compat/lib-rhashtable.c -@@ -175,10 +175,11 @@ static struct bucket_table *bucket_table - int i; - - size = sizeof(*tbl) + nbuckets * sizeof(tbl->buckets[0]); -- if (gfp != GFP_KERNEL) -+ if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER) || -+ gfp != GFP_KERNEL) - tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY); -- else -- tbl = kvzalloc(size, gfp); -+ if (tbl == NULL && gfp == GFP_KERNEL) -+ tbl = vzalloc(size); - - size = nbuckets; - |