Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
[deliverable/linux.git] / fs / seq_file.c
index 353948ba1c5b2d2ed08ead3448fb9218cbb89f96..dbf3a59c86bbbb081464830585f216623ab9f112 100644 (file)
@@ -25,7 +25,11 @@ static void *seq_buf_alloc(unsigned long size)
 {
        void *buf;
 
-       buf = kmalloc(size, GFP_KERNEL | __GFP_NOWARN);
+       /*
+        * __GFP_NORETRY to avoid oom-killings with high-order allocations -
+        * it's better to fall back to vmalloc() than to kill things.
+        */
+       buf = kmalloc(size, GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN);
        if (!buf && size > PAGE_SIZE)
                buf = vmalloc(size);
        return buf;
This page took 0.023362 seconds and 5 git commands to generate.