commit | 5fe9d8ca21cc1517258fe448639392d5d542eec6 | [log] [tgz] |
---|---|---|
author | Oleg Nesterov <[email protected]> | Wed Jul 03 15:08:19 2013 -0700 |
committer | Linus Torvalds <[email protected]> | Wed Jul 03 16:08:02 2013 -0700 |
tree | f1f5e8778d000c4bfaf7b44493186b48a6a5c7e3 | |
parent | bc03c691aa86948af4e272ebdcdd4203018210f3 [diff] |
coredump: cn_vprintf() has no reason to call vsnprintf() twice cn_vprintf() looks really overcomplicated and sub-optimal. We do not need vsnprintf(NULL) to calculate the size we need, we can simply try to print into the current buffer and expand/retry only if necessary. Signed-off-by: Oleg Nesterov <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Colin Walters <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Lennart Poettering <[email protected]> Cc: Lucas De Marchi <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>