aboutsummaryrefslogtreecommitdiffstats
path: root/fs/seq_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/seq_file.c')
-rw-r--r--fs/seq_file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 353948ba1c5b..dbf3a59c86bb 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -25,7 +25,11 @@ static void *seq_buf_alloc(unsigned long size)
25{ 25{
26 void *buf; 26 void *buf;
27 27
28 buf = kmalloc(size, GFP_KERNEL | __GFP_NOWARN); 28 /*
29 * __GFP_NORETRY to avoid oom-killings with high-order allocations -
30 * it's better to fall back to vmalloc() than to kill things.
31 */
32 buf = kmalloc(size, GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN);
29 if (!buf && size > PAGE_SIZE) 33 if (!buf && size > PAGE_SIZE)
30 buf = vmalloc(size); 34 buf = vmalloc(size);
31 return buf; 35 return buf;