[PATCH 12/14] backport: update lib-rhashtable.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luca Coelho <luciano.coelho@xxxxxxxxx>

The bucket_table_alloc() function was reworked, so update the patch
accordingly.  It's much simpler now, if !GFP_KERNEL, we just fail
(like we used to).  This is not a problem because we only use this
function with GFP_KERNEL anyway.

Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>
---
 patches/lib-rhashtable.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 patches/lib-rhashtable.patch

diff --git a/patches/lib-rhashtable.patch b/patches/lib-rhashtable.patch
new file mode 100644
index 000000000000..a538d0c83fc7
--- /dev/null
+++ b/patches/lib-rhashtable.patch
@@ -0,0 +1,14 @@
+diff --git a/compat/lib-rhashtable.c b/compat/lib-rhashtable.c
+index 30526afa8343..bee37f2682dd 100644
+--- a/compat/lib-rhashtable.c
++++ b/compat/lib-rhashtable.c
+@@ -173,7 +173,8 @@ static struct bucket_table *bucket_table_alloc(struct rhashtable *ht,
+ 	int i;
+ 
+ 	size = sizeof(*tbl) + nbuckets * sizeof(tbl->buckets[0]);
+-	tbl = kvzalloc(size, gfp);
++	if (gfp == GFP_KERNEL)
++		tbl = vzalloc(size);
+ 
+ 	size = nbuckets;
+ 
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux