[PATCH] maple_tree: use GFP_KERNEL on mas_node_count

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

 



Use GFP_KERNEL on mas_node_count instead of GFP_NOWAIT | __GFP_NOWARN
in order to allow memory reclaim.

Currently, fork errors occur on low free memory as follows:

 Zygote  : Failed to fork child process: Out of memory (12)

-ENOMEM was returned as following path:

 mas_node_count
 mas_expected_entries
 dup_mmap
 dup_mm
 copy_mm
 copy_process

Signed-off-by: jason.sim <jason.sim@xxxxxxxxxxx>
---
 lib/maple_tree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index ee1ff0c59fd7..076798f83baa 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -1336,11 +1336,11 @@ static void mas_node_count_gfp(struct ma_state *mas, int count, gfp_t gfp)
  * @mas: The maple state
  * @count: The number of nodes needed
  *
- * Note: Uses GFP_NOWAIT | __GFP_NOWARN for gfp flags.
+ * Note: Uses GFP_KERNEL for gfp flags.
  */
 static void mas_node_count(struct ma_state *mas, int count)
 {
-       return mas_node_count_gfp(mas, count, GFP_NOWAIT | __GFP_NOWARN);
+       return mas_node_count_gfp(mas, count, GFP_KERNEL);
 }
 
 /*
-- 
2.17.1




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

  Powered by Linux