diff options
author | Oleg Nesterov <oleg@redhat.com> | 2013-07-04 00:08:19 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 01:08:02 +0200 |
commit | 5fe9d8ca21cc1517258fe448639392d5d542eec6 (patch) | |
tree | f1f5e8778d000c4bfaf7b44493186b48a6a5c7e3 /fs/xattr.c | |
parent | coredump: introduce cn_vprintf() (diff) | |
download | linux-5fe9d8ca21cc1517258fe448639392d5d542eec6.tar.xz linux-5fe9d8ca21cc1517258fe448639392d5d542eec6.zip |
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 <oleg@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Colin Walters <walters@verbum.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Lennart Poettering <mzxreary@0pointer.de>
Cc: Lucas De Marchi <lucas.de.marchi@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/xattr.c')
0 files changed, 0 insertions, 0 deletions