aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pstore/ram.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/pstore/ram.c')
-rw-r--r--fs/pstore/ram.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 0b311bc1891..bcd1bbd4259 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -414,13 +414,14 @@ static int __devinit ramoops_probe(struct platform_device *pdev)
414 414
415 cxt->pstore.data = cxt; 415 cxt->pstore.data = cxt;
416 /* 416 /*
417 * Console can handle any buffer size, so prefer dumps buffer 417 * Console can handle any buffer size, so prefer LOG_LINE_MAX. If we
418 * size since usually it is smaller. 418 * have to handle dumps, we must have at least record_size buffer. And
419 * for ftrace, bufsize is irrelevant (if bufsize is 0, buf will be
420 * ZERO_SIZE_PTR).
419 */ 421 */
420 if (cxt->przs) 422 if (cxt->console_size)
421 cxt->pstore.bufsize = cxt->przs[0]->buffer_size; 423 cxt->pstore.bufsize = 1024; /* LOG_LINE_MAX */
422 else 424 cxt->pstore.bufsize = max(cxt->record_size, cxt->pstore.bufsize);
423 cxt->pstore.bufsize = cxt->cprz->buffer_size;
424 cxt->pstore.buf = kmalloc(cxt->pstore.bufsize, GFP_KERNEL); 425 cxt->pstore.buf = kmalloc(cxt->pstore.bufsize, GFP_KERNEL);
425 spin_lock_init(&cxt->pstore.buf_lock); 426 spin_lock_init(&cxt->pstore.buf_lock);
426 if (!cxt->pstore.buf) { 427 if (!cxt->pstore.buf) {